summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-14 13:29:36 (GMT)
committerMagnus Lundborg <lundborg.magnus@gmail.com>2013-10-14 13:31:58 (GMT)
commitfd25a62a8f0597ffaf2ea1e8ba7da5114660553e (patch)
tree0f573e7ba158e47fbec768e3d2326886490fa89e
parent20d74e7d97b876232134f2e88e4f3b39f792bfe2 (diff)
Change CMake parameter names to specifically include TNG.
-rw-r--r--CMakeLists.txt14
-rw-r--r--INSTALL4
-rw-r--r--Trajectoryformatspecification.mk2
-rw-r--r--include/tng_io.h2
-rw-r--r--src/lib/CMakeLists.txt4
-rw-r--r--src/lib/tng_io.c2
-rw-r--r--src/tests/CMakeLists.txt6
7 files changed, 17 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9edce2c..ca36e4e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,13 +7,13 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
include_directories(${CMAKE_SOURCE_DIR}/include)
-option(BUILD_FORTRAN "Build Fortran compatible library and examples for testing" OFF)
+option(TNG_BUILD_FORTRAN "Build Fortran compatible library and examples for testing" OFF)
-option(BUILD_TNG_EXAMPLES "Build examples showing usage of the TNG API" ON)
-option(BUILD_COMPRESSION_TESTS "Build tests of the TNG compression library" OFF)
+option(TNG_BUILD_EXAMPLES "Build examples showing usage of the TNG API" ON)
+option(TNG_BUILD_COMPRESSION_TESTS "Build tests of the TNG compression library" OFF)
-option(USE_OPENMP "Try to use the OpenMP library (if available)" ON)
-if(USE_OPENMP)
+option(TNG_USE_OPENMP "Try to use the OpenMP library (if available)" ON)
+if(TNG_USE_OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
@@ -31,8 +31,8 @@ add_subdirectory(src)
file(COPY example_files DESTINATION .)
#-- Add an Option to toggle the generation of the API documentation
-option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
-if(BUILD_DOCUMENTATION)
+option(TNG_BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
+if(TNG_BUILD_DOCUMENTATION)
find_package(Doxygen)
if (NOT DOXYGEN_FOUND)
message(FATAL_ERROR
diff --git a/INSTALL b/INSTALL
index a8f00a0..abcfa9b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,8 +12,8 @@ programs using the library must specify explicitly where to look for it.
Useful cmake flags:
--DBUILD_DOCUMENTATION=ON to build the API documentation (requires doxygen)
+-DTNG_BUILD_DOCUMENTATION=ON to build the API documentation (requires doxygen)
-DCMAKE_BUILD_TYPE=Debug to compile with debug flags (recommended for
feedback during development)
--DBUILD_FORTRAN=ON to build the Fortran MD simulations example, saving results
+-DTNG_BUILD_FORTRAN=ON to build the Fortran MD simulations example, saving results
in the TNG format (requires a Fortran compiler allowing cray-pointers). \ No newline at end of file
diff --git a/Trajectoryformatspecification.mk b/Trajectoryformatspecification.mk
index db8825d..96059cf 100644
--- a/Trajectoryformatspecification.mk
+++ b/Trajectoryformatspecification.mk
@@ -525,7 +525,7 @@ API
(The API should be separated into one high- and one low-level API, using
e.g. a tng\_low tag for the low-level functions.)
-API documentation is generated using the -DBUILD_DOCUMENTATION=ON option
+API documentation is generated using the -DTNG_BUILD_DOCUMENTATION=ON option
when running cmake. Requires a doxygen installation.
diff --git a/include/tng_io.h b/include/tng_io.h
index 9443dd3..24db340 100644
--- a/include/tng_io.h
+++ b/include/tng_io.h
@@ -259,7 +259,7 @@
* The TNG library can be used from Fortran. It requires cray pointers, which
* are not part of the Fortran 77 standard, but available in most compilers.
*
- * To compile the fortran example -DBUILD_FORTRAN=ON needs to be specified when
+ * To compile the fortran example -DTNG_BUILD_FORTRAN=ON needs to be specified when
* running cmake.
*
*/
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
index 4e46c4e..416e546 100644
--- a/src/lib/CMakeLists.txt
+++ b/src/lib/CMakeLists.txt
@@ -4,8 +4,8 @@ if(HAVE_INTTYPES_H)
set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS USE_STD_INTTYPES_H)
endif()
-if(BUILD_FORTRAN)
- set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS BUILD_FORTRAN)
+if(TNG_BUILD_FORTRAN)
+ set_property(TARGET tng_io APPEND PROPERTY COMPILE_DEFINITIONS TNG_BUILD_FORTRAN)
endif()
if(ZLIB_FOUND)
diff --git a/src/lib/tng_io.c b/src/lib/tng_io.c
index 6a5d035..c041472 100644
--- a/src/lib/tng_io.c
+++ b/src/lib/tng_io.c
@@ -14404,7 +14404,7 @@ tng_function_status DECLSPECDLLEXPORT tng_util_box_shape_with_time_write
return(stat);
}
-#ifdef BUILD_FORTRAN
+#ifdef TNG_BUILD_FORTRAN
/* The following is for calling the library from fortran */
tng_function_status DECLSPECDLLEXPORT tng_trajectory_init_(tng_trajectory_t *tng_data_p)
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 0e4ed12..13e7d88 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
-if(BUILD_COMPRESSION_TESTS)
+if(TNG_BUILD_COMPRESSION_TESTS)
add_subdirectory(compression)
endif()
@@ -25,7 +25,7 @@ endif()
set_property(TARGET tng_testing PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tests)
-if(BUILD_TNG_EXAMPLES)
+if(TNG_BUILD_EXAMPLES)
if(OPENMP_FOUND)
add_executable(md_openmp md_openmp.c)
target_link_libraries(md_openmp tng_io ${OpenMP_LIBS})
@@ -63,7 +63,7 @@ if(BUILD_TNG_EXAMPLES)
endif()
set_property(TARGET tng_parallel_read PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/examples)
- if(BUILD_FORTRAN)
+ if(TNG_BUILD_FORTRAN)
# This does not work due to a bug in CMake. Remove lines below if no fortran compiler is found.
enable_language(Fortran OPTIONAL)
if(${CMAKE_Fortran_COMPILER_WORKS})
contact: Jan Huwald // Impressum