Revision: 77555
http://sourceforge.net/p/brlcad/code/77555
Author: starseeker
Date: 2020-10-22 20:05:02 +0000 (Thu, 22 Oct 2020)
Log Message:
-----------
Break install prefix management out into a separate file.
Modified Paths:
--------------
brlcad/branches/extbuild/CMakeLists.txt
Added Paths:
-----------
brlcad/branches/extbuild/misc/CMake/BRLCAD_Install_Prefix.cmake
Modified: brlcad/branches/extbuild/CMakeLists.txt
===================================================================
--- brlcad/branches/extbuild/CMakeLists.txt 2020-10-22 19:48:30 UTC (rev
77554)
+++ brlcad/branches/extbuild/CMakeLists.txt 2020-10-22 20:05:02 UTC (rev
77555)
@@ -126,18 +126,6 @@
execute_process(COMMAND "${CMAKE_COMMAND}" -DSTAMP_FILE=${CONFIG_DELTA_START}
-P "${BRLCAD_CMAKE_DIR}/scripts/timestamp.cmake")
#---------------------------------------------------------------------
-
-# If CMAKE_INSTALL_PREFIX is "/usr", be VERY noisy about it - a make install in
-# this location is dangerous/destructive on some systems.
-if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
- message(WARNING "}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\nIt is
STRONGLY recommended that you DO NOT install BRL-CAD into /usr as BRL-CAD
provides several libraries that may conflict with other libraries (e.g. librt,
libbu, libbn) on certain system configurations.\nSince our libraries predate
all those that we're known to conflict with and are at the very core of our
geometry services and project heritage, we have no plans to change the names of
our libraries at this time.\nINSTALLING INTO /usr CAN MAKE A SYSTEM COMPLETELY
UNUSABLE. If you choose to continue installing into /usr, you do so entirely
at your own risk. You have been
warned.\n}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}")
- if(SLEEP_EXEC)
- execute_process(COMMAND ${SLEEP_EXEC} 15)
- endif(SLEEP_EXEC)
- message(FATAL_ERROR "If you wish to proceed using /usr as your prefix,
define BRLCAD_ALLOW_INSTALL_TO_USR=1 for CMake")
-endif("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
-
-#---------------------------------------------------------------------
# Define relative install locations and output directories. Don't set
# these if they have already been set by some other means (like a
# higher level CMakeLists.txt file including this one).
@@ -156,76 +144,6 @@
endif (NOT BRLCAD_IS_SUBBUILD)
#---------------------------------------------------------------------
-# Searching the system for packages presents something of a dilemma -
-# in most situations it is Very Bad for a BRL-CAD build to be using
-# older versions of libraries in install directories as search results.
-# Generally, the desired behavior is to ignore whatever libraries are
-# in the install directories, and only use external library results if
-# they are something already found on the system due to non-BRL-CAD
-# installation (source compile, package managers, etc.). Unfortunately,
-# CMake's standard behavior is to add CMAKE_INSTALL_PREFIX to the search
-# path once defined, resulting in (for us) the unexpected behavior of
-# returning old installed libraries when CMake is re-run in a directory.
-#
-# To work around this, there are two possible approaches. One,
-# identified by Maik Beckmann, operates on CMAKE_SYSTEM_PREFIX_PATH:
-#
-# http://www.cmake.org/pipermail/cmake/2010-October/040292.html
-#
-# The other, pointed out by Michael Hertling, uses the
-# CMake_[SYSTEM_]IGNORE_PATH variables.
-#
-# http://www.cmake.org/pipermail/cmake/2011-May/044503.html
-#
-# BRL-CAD initially operated on CMAKE_SYSTEM_PREFIX_PATH, but has
-# switched to using the *_IGNORE_PATH variables. This requires
-# CMake 2.8.3 or later.
-#
-# The complication with ignoring install paths is if we are
-# installing to a "legitimate" system search path - i.e. our
-# CMAKE_INSTALL_PREFIX value is standard enough that it is a legitimate
-# search target for find_package. In this case, we can't exclude
-# accidental hits on our libraries without also excluding legitimate
-# find_package results. So the net results are:
-#
-# 1. If you are planning to install to a system directory (typically
-# a bad idea but the settings are legal) clean out the old system
-# first or accept that the old libraries will be found and used.
-#
-# 2. For more custom paths, the logic below will avoid the value
-# of CMAKE_INSTALL_PREFIX in find_package searches
-#
-# (Note: CMAKE_INSTALL_PREFIX must be checked in the case where someone
-# sets it on the command line prior to CMake being run. BRLCAD_PREFIX
-# preserves the CMAKE_INSTALL_PREFIX setting from the previous CMake run.
-# CMAKE_INSTALL_PREFIX does not seem to be immediately set in this context
-# when CMake is re-run unless specified explicitly on the command line.
-# To ensure the previous (and internally set) CMAKE_INSTALL_PREFIX value
-# is available, BRLCAD_PREFIX is used to store the value in the cache.)
-
-if(CMAKE_INSTALL_PREFIX)
- if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
- get_filename_component(PATH_NORMALIZED
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" ABSOLUTE)
- set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
- endif(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-endif(CMAKE_INSTALL_PREFIX)
-
-if(CMAKE_INSTALL_PREFIX)
- if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
- get_filename_component(PATH_NORMALIZED
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" ABSOLUTE)
- set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
- endif(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
-endif(CMAKE_INSTALL_PREFIX)
-
-if(BRLCAD_PREFIX)
- if(NOT "${BRLCAD_PREFIX}" STREQUAL "/usr" AND NOT "${BRLCAD_PREFIX}"
STREQUAL "/usr/local")
- get_filename_component(PATH_NORMALIZED "${BRLCAD_PREFIX}/${LIB_DIR}"
ABSOLUTE)
- set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
- endif(NOT "${BRLCAD_PREFIX}" STREQUAL "/usr" AND NOT "${BRLCAD_PREFIX}"
STREQUAL "/usr/local")
-endif(BRLCAD_PREFIX)
-mark_as_advanced(CMAKE_SYSTEM_IGNORE_PATH)
-
-#---------------------------------------------------------------------
# For cleaning files as part of the distclean command, CMake needs
# to be aware of what various generators will (or might) write out
# in each build directory.
@@ -455,92 +373,12 @@
BOX_PRINT("*** Configuring BRL-CAD Release ${BRLCAD_VERSION}, Build
${CONFIG_DATE} ***" "*")
#---------------------------------------------------------------------
-# We want to check /usr/local by default, so add it if it exists
-if (IS_DIRECTORY /usr/local)
- set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local)
- if (IS_DIRECTORY /usr/local/include)
- set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
- endif (IS_DIRECTORY /usr/local/include)
-endif (IS_DIRECTORY /usr/local)
+# Intricacies involved with setting the install path mostly revolve
+# around build type dependent install directories. Also needs the
+# current version defined.
-#---------------------------------------------------------------------
-# The location in which to install BRL-CAD. Only do this if
-# CMAKE_INSTALL_PREFIX hasn't been set already, to try and allow
-# parent builds (if any) some control.
+include(BRLCAD_Install_Prefix)
-# TODO - generator expressions may be a way to replace some of this logic (or
-# improve it) by letting us ditch the logic tracking whether the path is
-# initialized to default - that's used to know whether or not it is safe to
-# override CMAKE_INSTALL_PREFIX based on build type. If we use the generator
-# expressions, we won't have to be concerned about that - problem is that
-# change will require updating all the install commands in the build target
-# functions. Third party logic will probably need to shift over to the new
-# ExternalProject_Add approach first as well - that way unmodified install
-# commands in 3rd party CMake files will be moot.
-#
-# if (NOT CMAKE_INSTALL_PREFIX)
-# set(CMAKE_INSTALL_PREFIX "/usr/brlcad/")
-# if (NOT MSVC)
-# set(gen_exp
$<IF:$<CONFIG:Debug>,dev-${BRLCAD_VERSION}/,$<IF:$<CONFIG:Release>,rel-${BRLCAD_VERSION}/${BRLCAD_VERSION},>>)
-# else (NOT MSVC)
-# set(gen_exp)
-# if(CMAKE_CL_64)
-# set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD
${BRLCAD_VERSION}")
-# else(CMAKE_CL_64)
-# set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
-# endif(CMAKE_CL_64)
-# endif (NOT MSVC)
-# endif (NOT CMAKE_INSTALL_PREFIX)
-# install(TARGETS mged DESTINATION ${gen_exp}${BIN_DIR})
-#
-# Another (maybe better) option instead of generators might be to use the
CONFIGURATIONS
-# option in our macros and the ExternalProject_Add management:
-# https://cmake.org/cmake/help/latest/command/install.html
-#
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
- if(NOT CMAKE_CONFIGURATION_TYPES)
- if("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- set(CMAKE_INSTALL_PREFIX "/usr/brlcad/rel-${BRLCAD_VERSION}")
- else("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
- endif("${CMAKE_BUILD_TYPE}" MATCHES "Release")
- else(NOT CMAKE_CONFIGURATION_TYPES)
- if(MSVC)
- if(CMAKE_CL_64)
- set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD ${BRLCAD_VERSION}")
- else(CMAKE_CL_64)
- set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
- endif(CMAKE_CL_64)
- else(MSVC)
- set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
- endif(MSVC)
- endif(NOT CMAKE_CONFIGURATION_TYPES)
- set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "BRL-CAD install
prefix" FORCE)
- set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
-endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
-set(BRLCAD_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE STRING "BRL-CAD install
prefix")
-mark_as_advanced(BRLCAD_PREFIX)
-if (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
- set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-endif (DEFINED CMAKE_INSTALL_PREFIX AND NOT DEFINED CMAKE_INSTALL_PREFIX)
-
-
-# If we've a Release build with a Debug path or vice versa, warn about
-# it. A "make install" of a Release build into a dev install
-# directory or vice versa is going to result in an install that
-# doesn't respect BRL-CAD standard naming conventions.
-if("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
- message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/dev-${BRLCAD_VERSION}, but build type is set to Release!\n")
-endif("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
-if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
- message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/rel-${BRLCAD_VERSION}, but build type is set to Debug!\n")
-endif("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
-
-#------------------------------------------------------------------------------
-# Now that we know the install prefix, generate the binary for calculating
-# and reporting time deltas
-generate_dreport()
-
#---------------------------------------------------------------------
# The following logic is what allows binaries to run successfully in
# the build directory AND install directory. Thanks to plplot for
Added: brlcad/branches/extbuild/misc/CMake/BRLCAD_Install_Prefix.cmake
===================================================================
--- brlcad/branches/extbuild/misc/CMake/BRLCAD_Install_Prefix.cmake
(rev 0)
+++ brlcad/branches/extbuild/misc/CMake/BRLCAD_Install_Prefix.cmake
2020-10-22 20:05:02 UTC (rev 77555)
@@ -0,0 +1,160 @@
+
+#---------------------------------------------------------------------
+# Searching the system for packages presents something of a dilemma -
+# in most situations it is Very Bad for a BRL-CAD build to be using
+# older versions of libraries in install directories as search results.
+# Generally, the desired behavior is to ignore whatever libraries are
+# in the install directories, and only use external library results if
+# they are something already found on the system due to non-BRL-CAD
+# installation (source compile, package managers, etc.). Unfortunately,
+# CMake's standard behavior is to add CMAKE_INSTALL_PREFIX to the search
+# path once defined, resulting in (for us) the unexpected behavior of
+# returning old installed libraries when CMake is re-run in a directory.
+#
+# To work around this, there are two possible approaches. One,
+# identified by Maik Beckmann, operates on CMAKE_SYSTEM_PREFIX_PATH:
+#
+# http://www.cmake.org/pipermail/cmake/2010-October/040292.html
+#
+# The other, pointed out by Michael Hertling, uses the
+# CMake_[SYSTEM_]IGNORE_PATH variables.
+#
+# http://www.cmake.org/pipermail/cmake/2011-May/044503.html
+#
+# BRL-CAD initially operated on CMAKE_SYSTEM_PREFIX_PATH, but has
+# switched to using the *_IGNORE_PATH variables. This requires
+# CMake 2.8.3 or later.
+#
+# The complication with ignoring install paths is if we are
+# installing to a "legitimate" system search path - i.e. our
+# CMAKE_INSTALL_PREFIX value is standard enough that it is a legitimate
+# search target for find_package. In this case, we can't exclude
+# accidental hits on our libraries without also excluding legitimate
+# find_package results. So the net results are:
+#
+# 1. If you are planning to install to a system directory (typically
+# a bad idea but the settings are legal) clean out the old system
+# first or accept that the old libraries will be found and used.
+#
+# 2. For more custom paths, the logic below will avoid the value
+# of CMAKE_INSTALL_PREFIX in find_package searches
+#
+# (Note: CMAKE_INSTALL_PREFIX must be checked in the case where someone
+# sets it on the command line prior to CMake being run. BRLCAD_PREFIX
+# preserves the CMAKE_INSTALL_PREFIX setting from the previous CMake run.
+# CMAKE_INSTALL_PREFIX does not seem to be immediately set in this context
+# when CMake is re-run unless specified explicitly on the command line.
+# To ensure the previous (and internally set) CMAKE_INSTALL_PREFIX value
+# is available, BRLCAD_PREFIX is used to store the value in the cache.)
+
+if(CMAKE_INSTALL_PREFIX)
+ if(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
+ get_filename_component(PATH_NORMALIZED
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}" ABSOLUTE)
+ set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
+ endif(NOT "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
+endif(CMAKE_INSTALL_PREFIX)
+if(BRLCAD_PREFIX)
+ if(NOT "${BRLCAD_PREFIX}" STREQUAL "/usr" AND NOT "${BRLCAD_PREFIX}"
STREQUAL "/usr/local")
+ get_filename_component(PATH_NORMALIZED "${BRLCAD_PREFIX}/${LIB_DIR}"
ABSOLUTE)
+ set(CMAKE_SYSTEM_IGNORE_PATH "${PATH_NORMALIZED}")
+ endif(NOT "${BRLCAD_PREFIX}" STREQUAL "/usr" AND NOT "${BRLCAD_PREFIX}"
STREQUAL "/usr/local")
+endif(BRLCAD_PREFIX)
+mark_as_advanced(CMAKE_SYSTEM_IGNORE_PATH)
+
+
+#---------------------------------------------------------------------
+# We want to check /usr/local by default, so add it if it exists
+if (IS_DIRECTORY /usr/local)
+ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local)
+ if (IS_DIRECTORY /usr/local/include)
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
+ include_directories(AFTER SYSTEM /usr/local/include)
+ endif (IS_DIRECTORY /usr/local/include)
+endif (IS_DIRECTORY /usr/local)
+
+#---------------------------------------------------------------------
+# The location in which to install BRL-CAD. Only do this if
+# CMAKE_INSTALL_PREFIX hasn't been set already, to try and allow
+# parent builds (if any) some control.
+
+# TODO - generator expressions may be a way to replace some of this logic (or
+# improve it) by letting us ditch the logic tracking whether the path is
+# initialized to default - that's used to know whether or not it is safe to
+# override CMAKE_INSTALL_PREFIX based on build type. If we use the generator
+# expressions, we won't have to be concerned about that - problem is that
+# change will require updating all the install commands in the build target
+# functions. Third party logic will probably need to shift over to the new
+# ExternalProject_Add approach first as well - that way unmodified install
+# commands in 3rd party CMake files will be moot.
+#
+# if (NOT CMAKE_INSTALL_PREFIX)
+# set(CMAKE_INSTALL_PREFIX "/usr/brlcad/")
+# if (NOT MSVC)
+# set(gen_exp
$<IF:$<CONFIG:Debug>,dev-${BRLCAD_VERSION}/,$<IF:$<CONFIG:Release>,rel-${BRLCAD_VERSION}/${BRLCAD_VERSION},>>)
+# else (NOT MSVC)
+# set(gen_exp)
+# if(CMAKE_CL_64)
+# set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD
${BRLCAD_VERSION}")
+# else(CMAKE_CL_64)
+# set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
+# endif(CMAKE_CL_64)
+# endif (NOT MSVC)
+# endif (NOT CMAKE_INSTALL_PREFIX)
+# install(TARGETS mged DESTINATION ${gen_exp}${BIN_DIR})
+#
+# Another (maybe better) option instead of generators might be to use the
CONFIGURATIONS
+# option in our macros and the ExternalProject_Add management:
+# https://cmake.org/cmake/help/latest/command/install.html
+#
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
+ if(NOT CMAKE_CONFIGURATION_TYPES)
+ if("${CMAKE_BUILD_TYPE}" MATCHES "Release")
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/rel-${BRLCAD_VERSION}")
+ else("${CMAKE_BUILD_TYPE}" MATCHES "Release")
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ endif("${CMAKE_BUILD_TYPE}" MATCHES "Release")
+ else(NOT CMAKE_CONFIGURATION_TYPES)
+ if(MSVC)
+ if(CMAKE_CL_64)
+ set(CMAKE_INSTALL_PREFIX "C:/Program Files/BRL-CAD ${BRLCAD_VERSION}")
+ else(CMAKE_CL_64)
+ set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/BRL-CAD
${BRLCAD_VERSION}")
+ endif(CMAKE_CL_64)
+ else(MSVC)
+ set(CMAKE_INSTALL_PREFIX "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ endif(MSVC)
+ endif(NOT CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "BRL-CAD install
prefix" FORCE)
+ set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 0)
+endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
+set(BRLCAD_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE STRING "BRL-CAD install
prefix")
+mark_as_advanced(BRLCAD_PREFIX)
+
+# If we've a Release build with a Debug path or vice versa, warn about
+# it. A "make install" of a Release build into a dev install
+# directory or vice versa is going to result in an install that
+# doesn't respect BRL-CAD standard naming conventions.
+if("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
+ message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/dev-${BRLCAD_VERSION}, but build type is set to Release!\n")
+endif("${CMAKE_BUILD_TYPE}" MATCHES "Release" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/dev-${BRLCAD_VERSION}")
+if("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
+ message(FATAL_ERROR "\nInstallation directory (CMAKE_INSTALL_PREFIX) is set
to /usr/brlcad/rel-${BRLCAD_VERSION}, but build type is set to Debug!\n")
+endif("${CMAKE_BUILD_TYPE}" MATCHES "Debug" AND "${CMAKE_INSTALL_PREFIX}"
STREQUAL "/usr/brlcad/rel-${BRLCAD_VERSION}")
+
+#------------------------------------------------------------------------------
+# If CMAKE_INSTALL_PREFIX is "/usr", be VERY noisy about it - a make install in
+# this location is dangerous/destructive on some systems.
+find_program(SLEEP_EXEC sleep)
+if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
+ message(WARNING "}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\nIt is
STRONGLY recommended that you DO NOT install BRL-CAD into /usr as BRL-CAD
provides several libraries that may conflict with other libraries (e.g. librt,
libbu, libbn) on certain system configurations.\nSince our libraries predate
all those that we're known to conflict with and are at the very core of our
geometry services and project heritage, we have no plans to change the names of
our libraries at this time.\nINSTALLING INTO /usr CAN MAKE A SYSTEM COMPLETELY
UNUSABLE. If you choose to continue installing into /usr, you do so entirely
at your own risk. You have been
warned.\n}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}")
+ if(SLEEP_EXEC)
+ execute_process(COMMAND ${SLEEP_EXEC} 15)
+ endif(SLEEP_EXEC)
+ message(FATAL_ERROR "If you wish to proceed using /usr as your prefix,
define BRLCAD_ALLOW_INSTALL_TO_USR=1 for CMake")
+endif("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT
BRLCAD_ALLOW_INSTALL_TO_USR)
+
+#------------------------------------------------------------------------------
+# Now that we know the install prefix, generate the binary for calculating
+# and reporting time deltas
+generate_dreport()
+
Property changes on:
brlcad/branches/extbuild/misc/CMake/BRLCAD_Install_Prefix.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits