Created
April 20, 2025 13:55
-
-
Save Ionizing/1f77941b6d9e0b51bd74e61211d720e5 to your computer and use it in GitHub Desktop.
xmake configuration for TRIQS/nda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_rules("mode.release") | |
set_languages("c++20") | |
package("nda") | |
add_deps("cmake") | |
set_sourcedir("/Users/ionizing/git/nda.src") | |
on_install(function (package) | |
local configs = {} | |
table.insert(configs, "-DOpenMP_CXX_FLAGS=" .. "-Xpreprocessor;-fopenmp;-I/opt/homebrew/opt/libomp/include;-L/opt/homebrew/opt/libomp/lib;-lomp") | |
table.insert(configs, "-DOpenMP_CXX_LIB_NAMES=" .. "libomp") | |
table.insert(configs, "-DOpenMP_libomp_LIBRARY=" .. "/opt/homebrew/opt/libomp/lib/libomp.dylib") | |
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release")) | |
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) | |
import("package.tools.cmake").install(package, configs) | |
end) | |
package_end() | |
add_requires("nda") | |
target("hello-world") | |
set_kind("binary") | |
add_files("src/*.cpp") | |
add_linkdirs("/opt/homebrew/opt/openblas/lib", "/opt/homebrew/opt/libomp/lib") | |
add_syslinks("openblas", "omp") | |
add_packages("nda") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment