Skip to content

Commit

Permalink
update cmakke
Browse files Browse the repository at this point in the history
  • Loading branch information
sameeul committed Sep 15, 2022
1 parent b4a6adb commit ac1646b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
9 changes: 0 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +0,0 @@
[submodule "lib/pybind11"]
path = lib/pybind11
url = https://github.com/pybind/pybind11.git
[submodule "lib/hedgehog"]
path = lib/hedgehog
url = https://github.com/usnistgov/hedgehog.git
[submodule "lib/fastloader"]
path = lib/fastloader
url = https://github.com/usnistgov/FastLoader.git
28 changes: 20 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,26 @@ endif()

find_file(Z5 "z5/z5.hxx" REQUIRED)

find_package(FastLoader)
if(FastLoader_FOUND)
list(APPEND Nyxus_LIBRARIES ${FastLoader_LIBRARIES})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FastLoader_CXX_FLAGS}")
include_directories(${FastLoader_INCLUDE_DIR})
else()
message(FATAL_ERROR "Unable to find FastLoader which is required for Nyxus.")
endif()
# find_package(FastLoader)
# if(FastLoader_FOUND)
# list(APPEND Nyxus_LIBRARIES ${FastLoader_LIBRARIES})
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FastLoader_CXX_FLAGS}")
# include_directories(${FastLoader_INCLUDE_DIR})
# else()
# message(FATAL_ERROR "Unable to find FastLoader which is required for Nyxus.")
# endif()

find_package(Threads QUIET)
if (Threads_FOUND)
if (CMAKE_USE_PTHREADS_INIT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif (CMAKE_USE_PTHREADS_INIT)
list(APPEND Nyxus_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
else ()
message(STATUS "Unable to find threads. Nyxus must have a threading library i.e. pthreads.")
endif ()
message(STATUS "FL FLAGS ${CMAKE_CXX_FLAGS}")
message(STATUS "FL LIBS ${Nyxus_LIBRARIES}")

if(USEGPU)
set(GPU_SOURCE_FILES
Expand Down
13 changes: 13 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ set(TEST_SRC

add_executable(runAllTests ${TEST_SRC})

find_package(Threads QUIET)
if (Threads_FOUND)
if (CMAKE_USE_PTHREADS_INIT)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif (CMAKE_USE_PTHREADS_INIT)
list(APPEND runAllTests_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
else ()
message(STATUS "Unable to find threads. Nyxus must have a threading library i.e. pthreads.")
endif ()
message(STATUS "FL FLAGS ${CMAKE_CXX_FLAGS}")
message(STATUS "FL LIBS ${runAllTests_LIBRARIES}")


if(USEGPU)

set(GPU_SOURCE_FILES
Expand Down

0 comments on commit ac1646b

Please sign in to comment.