Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Oct 9, 2017
1 parent e0ea1a1 commit c1fa1a6
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 30 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ include(autocmake_custom_color_messages)
include(autocmake_python_interpreter)
include(autocmake_ccache)
include(numgrid)
include(api)
include(GNUdirs)
include(include_paths)
include(external)
include(rpath)
include(version)
include(static_library)
include(export)
include(autocmake_definitions)
include(autocmake_code_coverage)
include(autocmake_safeguards)
Expand Down
3 changes: 0 additions & 3 deletions cmake/autocmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,11 @@ modules:
- '%(url_root)modules/python_interpreter.cmake'
- '%(url_root)modules/ccache.cmake'
- 'custom/numgrid.cmake'
- 'custom/api.cmake'
- 'custom/GNUdirs.cmake'
- 'custom/include_paths.cmake'
- 'custom/external.cmake'
- 'custom/rpath.cmake'
- 'custom/version.cmake'
- 'custom/static_library.cmake'
- 'custom/export.cmake'
- '%(url_root)modules/definitions.cmake'
- '%(url_root)modules/code_coverage.cmake'
- '%(url_root)modules/safeguards.cmake'
Expand Down
2 changes: 0 additions & 2 deletions cmake/custom/api.cmake

This file was deleted.

17 changes: 0 additions & 17 deletions cmake/custom/export.cmake

This file was deleted.

5 changes: 0 additions & 5 deletions cmake/custom/include_paths.cmake

This file was deleted.

11 changes: 11 additions & 0 deletions numgrid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ add_library(_numgrid OBJECT
bragg.cpp
)
target_include_directories(_numgrid SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/external/upstream)
target_include_directories(_numgrid SYSTEM PRIVATE ${PROJECT_BINARY_DIR}/include)
add_dependencies(_numgrid version)
set_target_properties(_numgrid PROPERTIES POSITION_INDEPENDENT_CODE 1)
list(APPEND _objects
Expand Down Expand Up @@ -89,3 +90,13 @@ if(NOT SHARED_LIBRARY_ONLY)
NAMESPACE "${PROJECT_NAME}::"
DESTINATION ${CMAKECONFIG_INSTALL_DIR})
endif()

install(FILES ${PROJECT_SOURCE_DIR}/numgrid/numgrid.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME})

message(STATUS "numgrid Fortran bindings ${BoldBlue}${ENABLE_FC_SUPPORT}${ColourReset}")
if(ENABLE_FC_SUPPORT)
add_library(numgrid_fortran OBJECT ${PROJECT_SOURCE_DIR}/numgrid/numgrid.f90)
set_target_properties(numgrid_fortran PROPERTIES INCLUDE_DIRECTORIES ""
POSITION_INDEPENDENT_CODE 1
)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ add_executable(
test.cpp
)

target_include_directories(cpp_test SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/numgrid ${PROJECT_BINARY_DIR}/include)

add_dependencies(cpp_test gtest)

target_link_libraries(
Expand Down

0 comments on commit c1fa1a6

Please sign in to comment.