summary refs log tree commit diff
path: root/pkgs/development/libraries/physics/hepmc/in_source.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/physics/hepmc/in_source.patch')
-rw-r--r--pkgs/development/libraries/physics/hepmc/in_source.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/libraries/physics/hepmc/in_source.patch b/pkgs/development/libraries/physics/hepmc/in_source.patch
new file mode 100644
index 00000000000..836a5655869
--- /dev/null
+++ b/pkgs/development/libraries/physics/hepmc/in_source.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,21 +37,6 @@ message(STATUS "default momentum and length are ${HEPMC_DEFAULT_MOM_UNIT} ${HEPM
+ # find the HepMC cmake modules
+ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules ${CMAKE_MODULE_PATH})
+ 
+-# make sure we are not building from within the source code directory
+-string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" in_source)
+-string( REGEX MATCH "${CMAKE_SOURCE_DIR}/" in_source_subdir
+-"${CMAKE_BINARY_DIR}")
+-if (in_source OR in_source_subdir)
+-  message(FATAL_ERROR "
+-ERROR: In source builds of this project are not allowed.
+-A separate build directory is required.
+-Please create one and run cmake from the build directory.
+-Also note that cmake has just added files to your source code directory.
+-We suggest getting a new copy of the source code.
+-Otherwise, delete `CMakeCache.txt' and the directory `CMakeFiles'.
+-  ")
+-endif ()
+-
+ # build_docs is OFF (false) by default
+ if ( build_docs )
+    message(STATUS "documents WILL be built and installed" )