Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests not compiling if OpenMP not found #705

Closed
bronger opened this issue Feb 10, 2019 · 3 comments
Closed

Tests not compiling if OpenMP not found #705

bronger opened this issue Feb 10, 2019 · 3 comments
Assignees
Labels
sf-archive Moved over from SourceForge

Comments

@bronger
Copy link
Contributor

bronger commented Feb 10, 2019

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.

Reported by: neothemachine

@bronger
Copy link
Contributor Author

bronger commented Feb 11, 2019

Thanks, should be fixed in master now.

Original comment by: seebk

@bronger
Copy link
Contributor Author

bronger commented Feb 11, 2019

  • status: open --> fixed
  • assigned_to: seebk

Original comment by: seebk

@bronger bronger added sf-archive Moved over from SourceForge sourceforge labels Apr 23, 2019
@bronger bronger closed this as completed Apr 23, 2019
@danfe
Copy link

danfe commented Oct 27, 2022

If OpenMP is strictly required for the tests

Is it, actually? Which particular test(s) require it? For version 0.3.95 it seems I can just delete lines that match OpenMP and all 26 (on x86, one less elsewhere because of SSE) tests would build and pass fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sf-archive Moved over from SourceForge
Projects
None yet
Development

No branches or pull requests

3 participants