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

CMake Defaults: No Cache #253

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions cmake/ImpactXFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,17 @@ endmacro()
#
macro(impactx_set_default_build_dirs)
if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
CACHE PATH "Build directory for archives")
mark_as_advanced(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()
if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
CACHE PATH "Build directory for libraries")
mark_as_advanced(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
endif()
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
CACHE PATH "Build directory for binaries")
mark_as_advanced(CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
endif()
if(NOT CMAKE_PYTHON_OUTPUT_DIRECTORY)
set(CMAKE_PYTHON_OUTPUT_DIRECTORY
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages"
CACHE PATH "Build directory for python modules"
)
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages")
endif()
endmacro()

Expand All @@ -80,14 +72,12 @@ macro(impactx_set_default_install_dirs)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_CMAKEDIR)
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake"
CACHE PATH "CMake config package location for installed targets")
if(WIN32)
set(CMAKE_INSTALL_LIBDIR Lib
CACHE PATH "Object code libraries")
set_property(CACHE CMAKE_INSTALL_CMAKEDIR PROPERTY VALUE "cmake")
set(CMAKE_INSTALL_LIBDIR Lib)
set(CMAKE_INSTALL_CMAKEDIR "cmake")
else()
set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
endif()
mark_as_advanced(CMAKE_INSTALL_CMAKEDIR)
endif()
endif()

Expand Down