Menu

#118 Tests not compiling if OpenMP not found

fixed
seebk
None
2019-02-11
2019-02-10
letmaik
No

This is about problems in the tests/CMakeLists.txt file.

First, the following two lines appear twice:

find_package(OpenMP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")

Second, if OpenMP is not found, then ${OpenMP_CXX_FLAGS} will be the string "NOTFOUND" which leads to compile errors. If OpenMP is strictly required for the tests, then REQUIRED should be added to the find_package call. If it's not required, then the CMAKE_CXX_FLAGS should be changed conditionally based on the OpenMP_CXX_FOUND flag.

Discussion

  • seebk

    seebk - 2019-02-11

    Thanks, should be fixed in master now.

     
  • seebk

    seebk - 2019-02-11
    • status: open --> fixed
    • assigned_to: seebk