[mlpack] 27/40: Fix bug where arma_config.hpp wouldn't be installed.
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:34:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 29639afa3888499f2ace4a1887ca6ba0be40ca9a
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Feb 1 08:35:38 2016 -0800
Fix bug where arma_config.hpp wouldn't be installed.
This would happen when the user configured once and immediately installed. The
issue was that MLPACK_SRCS had arma_config.hpp appended to it too late, and
didn't exist at the time of the first scan of files. When CMake was run a
second time, arma_config.hpp existed and thus would get picked up by the scan
and added to MLPACK_SRCS. This is a bug I didn't run into because I don't build
from a new environment every time...
---
CMakeLists.txt | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0cf2e32..287ba97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -264,15 +264,6 @@ if (GIT_FOUND)
endif (${MLPACK_TMP_REV_INFO_RESULT} EQUAL 0)
endif (GIT_FOUND)
-# Recurse into the rest of the project.
-add_subdirectory(src/mlpack)
-
-# If we need to keep gitversion.hpp up to date, then make sure the mlpack target
-# depends on it.
-if (USING_GIT STREQUAL "YES")
- add_dependencies(mlpack mlpack_gitversion)
-endif (USING_GIT STREQUAL "YES")
-
# Create a target to generate arma_config.hpp, which is used to warn the user
# when they are doing something stupid when linking something against mlpack.
include(CMake/CreateArmaConfigInfo.cmake)
@@ -286,6 +277,19 @@ add_custom_target(mlpack_arma_config ALL
COMMENT "Updating arma_config.hpp (if necessary)")
set(MLPACK_SRCS ${MLPACK_SRCS}
"${CMAKE_CURRENT_SOURCE_DIR}/src/mlpack/core/util/arma_config.hpp")
+
+# Recurse into the rest of the project.
+add_subdirectory(src/mlpack)
+
+# If we need to keep gitversion.hpp up to date, then make sure the mlpack target
+# depends on it.
+if (USING_GIT STREQUAL "YES")
+ add_dependencies(mlpack mlpack_gitversion)
+endif (USING_GIT STREQUAL "YES")
+
+# Make the mlpack_arma_config target depend on mlpack (we couldn't do this
+# before the add_subdirectory() call because the mlpack target didn't exist
+# before that).
add_dependencies(mlpack mlpack_arma_config)
# Make a target to generate the documentation. If Doxygen isn't installed, then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list