I am running cmake 3.2.2 on Linux 64 bits

I run cmake with

 cmake -G "Unix Makefiles" -DSYSTEMC_PATH=$HOME/systemc-2.3.1/

In my CMakeLists.txt,

If I put

 find_library(SYSC_LIB systemc PATHS "${SYSTEMC_PATH}"
              PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64)

it works.

If I put
 find_library(SYSC_LIB systemc PATHS ENV SYSTEMC_PATH
              PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64)

which I think should be identical, I get error
CMake Error at CMakeLists.txt:28 (message):
  ERROR: SYSC_LIB-NOTFOUND

Can anyone explain the difference and why the second does not work ?

btw

find_library(SYSC_LIB NAMES systemc foobar PATHS "${SYSTEMC_PATH}"
               PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64)

 also works
and
    find_library(SYSC_LIB systemc PATHS ENV SYSTEMC_PATH
      PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64
      NO_DEFAULT_PATH)
also fails

At least it is consistent :-(

Thanx

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to