Skip to content

Recoding cmake to use BLT - #195

Open
rblake-llnl wants to merge 40 commits into
developfrom
blake14/blt_cmake
Open

Recoding cmake to use BLT#195
rblake-llnl wants to merge 40 commits into
developfrom
blake14/blt_cmake

Conversation

@rblake-llnl

Copy link
Copy Markdown
Member

I've recoded things here to use BLT everywhere. This is a complete redesign of the Cmakefile and export system.

In particular, I've added flags so that we can link in AMS in a large multiphysics code. The flags I"m using are:

cmake \
-DBUILD_SHARED_LIBS=On \
-DBLT_SOURCE_DIR="$EXTERNAL_BLT_SOURCE_DIR" \
-DENABLE_CALIPER=Off \
-DENABLE_RMQ=Off \
-DENABLE_WORKFLOW=Off \
-DENABLE_TESTS=On \
-DAMS_ENABLE_DEBUG=On \
-DENABLE_CUDA=${WITH_CUDA} \
-DENABLE_MPI=On \
-DTorch_DIR="$AMS_TORCH_PATH" \
-DAMS_FMT_DIR="$AMS_FMT_DIR" \
-DHDF5_DIR="$AMS_HDF5_PATH" \
-DHDF5_USE_STATIC_LIBRARIES=On \
-DHDF5_WITH_INTEL_RUNTIME=... \
-DZLIB_DIR="$AMS_ZLIB_PATH" \
-Dnlohmann_json_DIR="$AMS_NLOHMANN_JSON_DIR" \
-Dtl-expected_DIR="$AMS_TL_EXPECTED_DIR" \
-DCMAKE_INSTALL_PREFIX=./install \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER="${CC:-gcc}" \
-DCMAKE_CXX_COMPILER="${CXX:-g++}" \
../

@lpottier
lpottier self-requested a review June 3, 2026 23:14
I just checked out 0.7.1 manually. Please override as needed.
lpottier and others added 6 commits July 21, 2026 16:06
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>

@lpottier lpottier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. If tests are passing, we can merge.

Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
…it objects

Signed-off-by: Loic Pottier <pottier1@llnl.gov>
Signed-off-by: Loic Pottier <pottier1@llnl.gov>
@lpottier
lpottier deployed to github-pages August 10, 2026 02:36 — with GitHub Actions Active

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cpp-linter Review

Used clang-format v18.1.8

Click here for the full clang-format patch
diff --git a/tests/AMSlib/ams_catch_main.hpp b/tests/AMSlib/ams_catch_main.hpp
index 58ae712..e72dac6 100644
--- a/tests/AMSlib/ams_catch_main.hpp
+++ b/tests/AMSlib/ams_catch_main.hpp
@@ -27 +27 @@ inline int runCatchSession(int argc, char** argv, bool finalizeAMS = true)
-}
+}  // namespace ams::test
diff --git a/tests/AMSlib/ams_interface/ams_ete.cpp b/tests/AMSlib/ams_interface/ams_ete.cpp
index 6802559..5b64484 100644
--- a/tests/AMSlib/ams_interface/ams_ete.cpp
+++ b/tests/AMSlib/ams_interface/ams_ete.cpp
@@ -14 +13,0 @@
-#include <cstdio>
@@ -15,0 +15 @@
+#include <cstdio>
diff --git a/tests/AMSlib/wf/evaluate_in_and_outs.cpp b/tests/AMSlib/wf/evaluate_in_and_outs.cpp
index 3370f49..2f7630e 100644
--- a/tests/AMSlib/wf/evaluate_in_and_outs.cpp
+++ b/tests/AMSlib/wf/evaluate_in_and_outs.cpp
@@ -11,0 +12 @@
+#include <cstdint>
@@ -14 +14,0 @@
-#include <cstdint>

Have any feedback or feature suggestions? Share it here.

Comment thread tests/AMSlib/ams_catch_main.hpp Outdated
const int normalizedRC = (rc == 0 || rc == 4) ? EXIT_SUCCESS : rc;
std::_Exit(normalizedRC);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
}
} // namespace ams::test

@@ -11,6 +11,7 @@
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <cstdio>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Please remove the line(s)

  • 14

Comment thread tests/AMSlib/ams_interface/ams_ete.cpp Outdated
@@ -11,6 +11,7 @@
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <cstdio>
#include <cstdint>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
#include <cstdint>
#include <cstdio>

@@ -9,6 +9,8 @@
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <cstdio>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Suggested change
#include <cstdio>
#include <cstdint>

@@ -9,6 +9,8 @@
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <cstdio>
#include <cstdlib>
#include <cstdint>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format suggestion

Please remove the line(s)

  • 14

Signed-off-by: Loic Pottier <pottier1@llnl.gov>
@lpottier
lpottier deployed to github-pages August 10, 2026 22:46 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants