Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoftco committed Nov 30, 2023
1 parent 7910a60 commit 4367ac1
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 18 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ if (STAQ_INSTALL_SOURCES)
"cmake/staqConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/staqConfig.cmake"
INSTALL_DESTINATION "lib/cmake/${PROJECT_NAME}"
)
install(FILES "${CMAKE_SOURCE_DIR}/cmake/FindGMP.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/staqConfig.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}")
install(FILES "${CMAKE_SOURCE_DIR}/cmake/staq_grid_synth.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}")
install(FILES "${CMAKE_SOURCE_DIR}/cmake/staq_msvc.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}")
install(FILES "${CMAKE_SOURCE_DIR}/cmake/staq_msvc_pthread.cmake" DESTINATION "lib/cmake/${PROJECT_NAME}")
endif ()

#### Uninstall
Expand Down
2 changes: 2 additions & 0 deletions cmake/FindGMP.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
set(GMP_PREFIX "" CACHE PATH "path ")

list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/staq")

find_path(GMP_INCLUDE_DIR gmp.h gmpxx.h
PATHS ${GMP_PREFIX}/include /usr/include /usr/local/include
/opt/homebrew/include)
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions cmake/staqConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
@PACKAGE_INIT@

set(STAQ_INSTALL_DIR "@STAQ_INSTALL_DIR@")
include("${CMAKE_CURRENT_LIST_DIR}/FindGMP.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/staq_grid_synth.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/staq_msvc.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/staq_msvc_pthread.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/staq_targets.cmake")
message(STATUS "Found staq's source code in @STAQ_INSTALL_DIR@")
10 changes: 0 additions & 10 deletions cmake/staq_msvc.cmake

This file was deleted.

4 changes: 4 additions & 0 deletions cmake/staq_msvc_pthread.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#### Microsoft Visual Studio lack of pthread.h
if (MSVC)
include_directories(SYSTEM ${STAQ_INSTALL_DIR}/third_party/pthreadwin32)
endif ()
1 change: 1 addition & 0 deletions examples/standalone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set(CMAKE_CXX_STANDARD 17)
# set(CMAKE_PREFIX_PATH "/path/to/installed/staq")

find_package(staq REQUIRED)
#find_package(GMP REQUIRED)

add_executable(standalone src/main.cpp)
target_link_libraries(standalone PUBLIC libstaq)
2 changes: 1 addition & 1 deletion src/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ file(GLOB FILENAMES *.cpp)
add_custom_target(tools COMMENT "Build all binary tools.")

message(WARNING "tools")
include(${CMAKE_SOURCE_DIR}/cmake/staq_grid_synth.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/grid_synth.cmake)

foreach (filename ${FILENAMES})
get_filename_component(basename ${filename} NAME_WE)
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ aux_source_directory(tests/mapping TEST_FILES)
aux_source_directory(tests/synthesis TEST_FILES)

message(WARNING "unit_tests")
include(${CMAKE_SOURCE_DIR}/cmake/staq_grid_synth.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/grid_synth.cmake)
if (${BUILD_GRID_SYNTH})
aux_source_directory(tests/grid_synth TEST_FILES)
endif ()
Expand Down

0 comments on commit 4367ac1

Please sign in to comment.