Skip to content

Commit

Permalink
find openmp declared required only once
Browse files Browse the repository at this point in the history
added subfolders after finding openmp
  • Loading branch information
kvedala committed May 31, 2020
1 parent 2a9b520 commit aa98625
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 25 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ endif(MSVC)

find_library(MATH_LIBRARY m)

add_subdirectory(conversions)
add_subdirectory(misc)
add_subdirectory(project_euler)
add_subdirectory(sorting)
add_subdirectory(searching)
add_subdirectory(numerical_methods)

if(USE_OPENMP)
find_package(OpenMP)
if (OpenMP_C_FOUND)
Expand All @@ -64,6 +57,13 @@ if(USE_OPENMP)
endif()
endif()

add_subdirectory(conversions)
add_subdirectory(misc)
add_subdirectory(project_euler)
add_subdirectory(sorting)
add_subdirectory(searching)
add_subdirectory(numerical_methods)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
3 changes: 0 additions & 3 deletions conversions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
if(USE_OPENMP)
find_package(OpenMP)
endif(USE_OPENMP)
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
# with full pathname. RELATIVE may makes it easier to extract an executable name
# automatically.
Expand Down
4 changes: 0 additions & 4 deletions misc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if(USE_OPENMP)
find_package(OpenMP)
endif()

# If necessary, use the RELATIVE flag, otherwise each source file may be listed
# with full pathname. RELATIVE may makes it easier to extract an executable name
# automatically.
Expand Down
3 changes: 0 additions & 3 deletions numerical_methods/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
if(USE_OPENMP)
find_package(OpenMP)
endif(USE_OPENMP)
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
# with full pathname. RELATIVE may makes it easier to extract an executable name
# automatically.
Expand Down
4 changes: 0 additions & 4 deletions project_euler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if(USE_OPENMP)
find_package(OpenMP)
endif()

# If necessary, use the RELATIVE flag, otherwise each source file may be listed
# with full pathname. RELATIVE may makes it easier to extract an executable name
# automatically.
Expand Down
4 changes: 0 additions & 4 deletions searching/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if(USE_OPENMP)
find_package(OpenMP)
endif()

# If necessary, use the RELATIVE flag, otherwise each source file may be listed
# with full pathname. RELATIVE may makes it easier to extract an executable name
# automatically.
Expand Down

0 comments on commit aa98625

Please sign in to comment.