From e23614cab12f4b0d51e9a7a4759f272c239a707f Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Mon, 22 Jul 2024 10:00:57 -0400 Subject: [PATCH] Move Au code into `code/au` subfolder (#266) This replaces the `project_symlinks` approach we had been using for CMake: it turns out that symlinks are fraught and error prone on Windows. After this PR, CMake support on Windows is confirmed to work! To make this work, we had to satisfy a number of challenging constraints: 1. The include path had to be `"au/..."` (e.g., `"au/io.hh"`) for all files, on both bazel and CMake. 2. The `au` folder that contained the actual code needed to live inside of a true subdirectory --- not the git repository root folder (as it has been since time immemorial), and not a symlink (as we had been using to get CMake support). 3. The git repository root folder needed to also be the root of the bazel folder, because we use that for all of our bazel-backed tools, and because we want users to be able to run all `bazel` commands from the repo root. I previously tried a variety of approaches here, including: - Having CMake create the symlink, instead of having it checked in (bad idea: you can't create symlinks in Windows without developer mode). - Making a `code` subfolder in the git repository root that had _its own separate `WORKSPACE` file_, and was included as a local bazel repo (terrible idea: we'd need two copies of all auxiliary bazel files, and making the single-file script work was nightmarishly complex --- I never even fully got there). In the end, the approach that works is to use the `includes` attribute of the `cc_library` rule. This is simple and direct: it's designed to solve this exact problem. The only real downside is that we need to prepend `code/au` to a lot of files in the `BUILD.bazel` for `//au`, and also in a couple of places in the single file script. Helps #215. --- CMakeLists.txt | 2 +- au/BUILD.bazel | 142 +++-- au/CMakeLists.txt | 492 +---------------- .../code}/CMakeLists.txt | 0 au/code/au/CMakeLists.txt | 505 ++++++++++++++++++ au/{ => code/au}/apply_magnitude.hh | 0 au/{ => code/au}/apply_magnitude_test.cc | 0 .../apply_rational_magnitude_to_integral.hh | 0 ...ply_rational_magnitude_to_integral_test.cc | 0 au/{ => code/au}/au.hh | 0 au/{ => code/au}/au_test.cc | 0 au/{ => code/au}/chrono_interop.hh | 0 au/{ => code/au}/chrono_interop_test.cc | 0 au/{ => code/au}/chrono_policy_validation.hh | 0 .../au}/chrono_policy_validation_test.cc | 0 au/{ => code/au}/constant.hh | 0 au/{ => code/au}/constant_test.cc | 0 au/{ => code/au}/conversion_policy.hh | 0 au/{ => code/au}/conversion_policy_test.cc | 0 au/{ => code/au}/dimension.hh | 0 au/{ => code/au}/dimension_test.cc | 0 au/{ => code/au}/io.hh | 0 au/{ => code/au}/io_test.cc | 0 au/{ => code/au}/magnitude.hh | 0 au/{ => code/au}/magnitude_test.cc | 0 au/{ => code/au}/math.hh | 0 au/{ => code/au}/math_test.cc | 0 au/{ => code/au}/no_wconversion_test.cc | 0 au/{ => code/au}/operators.hh | 0 au/{ => code/au}/operators_test.cc | 0 au/{ => code/au}/packs.hh | 0 au/{ => code/au}/packs_test.cc | 0 au/{ => code/au}/power_aliases.hh | 0 au/{ => code/au}/power_aliases_test.cc | 0 au/{ => code/au}/prefix.hh | 0 au/{ => code/au}/prefix_test.cc | 0 au/{ => code/au}/quantity.hh | 0 ...ntity_chrono_policy_correspondence_test.cc | 0 au/{ => code/au}/quantity_point.hh | 0 au/{ => code/au}/quantity_point_test.cc | 0 au/{ => code/au}/quantity_test.cc | 0 au/{ => code/au}/rep.hh | 0 au/{ => code/au}/rep_test.cc | 0 .../au}/stdx/experimental/is_detected.hh | 0 au/{ => code/au}/stdx/functional.hh | 0 au/{ => code/au}/stdx/test/utility_test.cc | 0 au/{ => code/au}/stdx/type_traits.hh | 0 au/{ => code/au}/stdx/utility.hh | 0 au/{ => code/au}/testing.hh | 0 au/{ => code/au}/testing_test.cc | 0 au/{ => code/au}/unit_of_measure.hh | 0 au/{ => code/au}/unit_of_measure_test.cc | 0 au/{ => code/au}/unit_symbol.hh | 0 au/{ => code/au}/unit_symbol_test.cc | 0 au/{ => code/au}/units/amperes.hh | 0 au/{ => code/au}/units/bars.hh | 0 au/{ => code/au}/units/becquerel.hh | 0 au/{ => code/au}/units/bits.hh | 0 au/{ => code/au}/units/bytes.hh | 0 au/{ => code/au}/units/candelas.hh | 0 au/{ => code/au}/units/celsius.hh | 0 au/{ => code/au}/units/coulombs.hh | 0 au/{ => code/au}/units/days.hh | 0 au/{ => code/au}/units/degrees.hh | 0 au/{ => code/au}/units/fahrenheit.hh | 0 au/{ => code/au}/units/farads.hh | 0 au/{ => code/au}/units/fathoms.hh | 0 au/{ => code/au}/units/feet.hh | 0 au/{ => code/au}/units/furlongs.hh | 0 au/{ => code/au}/units/grams.hh | 0 au/{ => code/au}/units/grays.hh | 0 au/{ => code/au}/units/henries.hh | 0 au/{ => code/au}/units/hertz.hh | 0 au/{ => code/au}/units/hours.hh | 0 au/{ => code/au}/units/inches.hh | 0 au/{ => code/au}/units/joules.hh | 0 au/{ => code/au}/units/katals.hh | 0 au/{ => code/au}/units/kelvins.hh | 0 au/{ => code/au}/units/knots.hh | 0 au/{ => code/au}/units/liters.hh | 0 au/{ => code/au}/units/lumens.hh | 0 au/{ => code/au}/units/lux.hh | 0 au/{ => code/au}/units/meters.hh | 0 au/{ => code/au}/units/miles.hh | 0 au/{ => code/au}/units/minutes.hh | 0 au/{ => code/au}/units/moles.hh | 0 au/{ => code/au}/units/nautical_miles.hh | 0 au/{ => code/au}/units/newtons.hh | 0 au/{ => code/au}/units/ohms.hh | 0 au/{ => code/au}/units/pascals.hh | 0 au/{ => code/au}/units/percent.hh | 0 au/{ => code/au}/units/pounds_force.hh | 0 au/{ => code/au}/units/pounds_mass.hh | 0 au/{ => code/au}/units/radians.hh | 0 au/{ => code/au}/units/revolutions.hh | 0 au/{ => code/au}/units/seconds.hh | 0 au/{ => code/au}/units/siemens.hh | 0 au/{ => code/au}/units/slugs.hh | 0 au/{ => code/au}/units/standard_gravity.hh | 0 au/{ => code/au}/units/steradians.hh | 0 au/{ => code/au}/units/tesla.hh | 0 au/{ => code/au}/units/test/amperes_test.cc | 0 au/{ => code/au}/units/test/bars_test.cc | 0 au/{ => code/au}/units/test/becquerel_test.cc | 0 au/{ => code/au}/units/test/bits_test.cc | 0 au/{ => code/au}/units/test/bytes_test.cc | 0 au/{ => code/au}/units/test/candelas_test.cc | 0 au/{ => code/au}/units/test/celsius_test.cc | 0 au/{ => code/au}/units/test/coulombs_test.cc | 0 au/{ => code/au}/units/test/days_test.cc | 0 au/{ => code/au}/units/test/degrees_test.cc | 0 .../au}/units/test/fahrenheit_test.cc | 0 au/{ => code/au}/units/test/farads_test.cc | 0 au/{ => code/au}/units/test/fathoms_test.cc | 0 au/{ => code/au}/units/test/feet_test.cc | 0 au/{ => code/au}/units/test/furlongs_test.cc | 0 au/{ => code/au}/units/test/grams_test.cc | 0 au/{ => code/au}/units/test/grays_test.cc | 0 au/{ => code/au}/units/test/henries_test.cc | 0 au/{ => code/au}/units/test/hertz_test.cc | 0 au/{ => code/au}/units/test/hours_test.cc | 0 au/{ => code/au}/units/test/inches_test.cc | 0 au/{ => code/au}/units/test/joules_test.cc | 0 au/{ => code/au}/units/test/katals_test.cc | 0 au/{ => code/au}/units/test/kelvins_test.cc | 0 au/{ => code/au}/units/test/knots_test.cc | 0 au/{ => code/au}/units/test/liters_test.cc | 0 au/{ => code/au}/units/test/lumens_test.cc | 0 au/{ => code/au}/units/test/lux_test.cc | 0 au/{ => code/au}/units/test/meters_test.cc | 0 au/{ => code/au}/units/test/miles_test.cc | 0 au/{ => code/au}/units/test/minutes_test.cc | 0 au/{ => code/au}/units/test/moles_test.cc | 0 .../au}/units/test/nautical_miles_test.cc | 0 au/{ => code/au}/units/test/newtons_test.cc | 0 au/{ => code/au}/units/test/ohms_test.cc | 0 au/{ => code/au}/units/test/pascals_test.cc | 0 au/{ => code/au}/units/test/percent_test.cc | 0 .../au}/units/test/pounds_force_test.cc | 0 .../au}/units/test/pounds_mass_test.cc | 0 au/{ => code/au}/units/test/radians_test.cc | 0 .../au}/units/test/revolutions_test.cc | 0 au/{ => code/au}/units/test/seconds_test.cc | 0 au/{ => code/au}/units/test/siemens_test.cc | 0 au/{ => code/au}/units/test/slugs_test.cc | 0 .../au}/units/test/standard_gravity_test.cc | 0 .../au}/units/test/steradians_test.cc | 0 au/{ => code/au}/units/test/tesla_test.cc | 0 au/{ => code/au}/units/test/unos_test.cc | 0 au/{ => code/au}/units/test/volts_test.cc | 0 au/{ => code/au}/units/test/watts_test.cc | 0 au/{ => code/au}/units/test/webers_test.cc | 0 au/{ => code/au}/units/test/yards_test.cc | 0 au/{ => code/au}/units/unos.hh | 0 au/{ => code/au}/units/volts.hh | 0 au/{ => code/au}/units/watts.hh | 0 au/{ => code/au}/units/webers.hh | 0 au/{ => code/au}/units/yards.hh | 0 au/{ => code/au}/utility/factoring.hh | 0 au/{ => code/au}/utility/string_constant.hh | 0 .../au}/utility/test/factoring_test.cc | 0 .../au}/utility/test/string_constant_test.cc | 0 .../au}/utility/test/type_traits_test.cc | 0 au/{ => code/au}/utility/type_traits.hh | 0 au/{ => code/au}/wrapper_operations.hh | 0 au/{ => code/au}/wrapper_operations_test.cc | 0 au/{ => code/au}/zero.hh | 0 au/{ => code/au}/zero_test.cc | 0 cmake/HeaderOnlyLibrary.cmake | 2 +- cmake/project_symlinks/au | 1 - tools/bin/make-single-file | 4 +- 171 files changed, 594 insertions(+), 554 deletions(-) rename {cmake/project_symlinks => au/code}/CMakeLists.txt (100%) create mode 100644 au/code/au/CMakeLists.txt rename au/{ => code/au}/apply_magnitude.hh (100%) rename au/{ => code/au}/apply_magnitude_test.cc (100%) rename au/{ => code/au}/apply_rational_magnitude_to_integral.hh (100%) rename au/{ => code/au}/apply_rational_magnitude_to_integral_test.cc (100%) rename au/{ => code/au}/au.hh (100%) rename au/{ => code/au}/au_test.cc (100%) rename au/{ => code/au}/chrono_interop.hh (100%) rename au/{ => code/au}/chrono_interop_test.cc (100%) rename au/{ => code/au}/chrono_policy_validation.hh (100%) rename au/{ => code/au}/chrono_policy_validation_test.cc (100%) rename au/{ => code/au}/constant.hh (100%) rename au/{ => code/au}/constant_test.cc (100%) rename au/{ => code/au}/conversion_policy.hh (100%) rename au/{ => code/au}/conversion_policy_test.cc (100%) rename au/{ => code/au}/dimension.hh (100%) rename au/{ => code/au}/dimension_test.cc (100%) rename au/{ => code/au}/io.hh (100%) rename au/{ => code/au}/io_test.cc (100%) rename au/{ => code/au}/magnitude.hh (100%) rename au/{ => code/au}/magnitude_test.cc (100%) rename au/{ => code/au}/math.hh (100%) rename au/{ => code/au}/math_test.cc (100%) rename au/{ => code/au}/no_wconversion_test.cc (100%) rename au/{ => code/au}/operators.hh (100%) rename au/{ => code/au}/operators_test.cc (100%) rename au/{ => code/au}/packs.hh (100%) rename au/{ => code/au}/packs_test.cc (100%) rename au/{ => code/au}/power_aliases.hh (100%) rename au/{ => code/au}/power_aliases_test.cc (100%) rename au/{ => code/au}/prefix.hh (100%) rename au/{ => code/au}/prefix_test.cc (100%) rename au/{ => code/au}/quantity.hh (100%) rename au/{ => code/au}/quantity_chrono_policy_correspondence_test.cc (100%) rename au/{ => code/au}/quantity_point.hh (100%) rename au/{ => code/au}/quantity_point_test.cc (100%) rename au/{ => code/au}/quantity_test.cc (100%) rename au/{ => code/au}/rep.hh (100%) rename au/{ => code/au}/rep_test.cc (100%) rename au/{ => code/au}/stdx/experimental/is_detected.hh (100%) rename au/{ => code/au}/stdx/functional.hh (100%) rename au/{ => code/au}/stdx/test/utility_test.cc (100%) rename au/{ => code/au}/stdx/type_traits.hh (100%) rename au/{ => code/au}/stdx/utility.hh (100%) rename au/{ => code/au}/testing.hh (100%) rename au/{ => code/au}/testing_test.cc (100%) rename au/{ => code/au}/unit_of_measure.hh (100%) rename au/{ => code/au}/unit_of_measure_test.cc (100%) rename au/{ => code/au}/unit_symbol.hh (100%) rename au/{ => code/au}/unit_symbol_test.cc (100%) rename au/{ => code/au}/units/amperes.hh (100%) rename au/{ => code/au}/units/bars.hh (100%) rename au/{ => code/au}/units/becquerel.hh (100%) rename au/{ => code/au}/units/bits.hh (100%) rename au/{ => code/au}/units/bytes.hh (100%) rename au/{ => code/au}/units/candelas.hh (100%) rename au/{ => code/au}/units/celsius.hh (100%) rename au/{ => code/au}/units/coulombs.hh (100%) rename au/{ => code/au}/units/days.hh (100%) rename au/{ => code/au}/units/degrees.hh (100%) rename au/{ => code/au}/units/fahrenheit.hh (100%) rename au/{ => code/au}/units/farads.hh (100%) rename au/{ => code/au}/units/fathoms.hh (100%) rename au/{ => code/au}/units/feet.hh (100%) rename au/{ => code/au}/units/furlongs.hh (100%) rename au/{ => code/au}/units/grams.hh (100%) rename au/{ => code/au}/units/grays.hh (100%) rename au/{ => code/au}/units/henries.hh (100%) rename au/{ => code/au}/units/hertz.hh (100%) rename au/{ => code/au}/units/hours.hh (100%) rename au/{ => code/au}/units/inches.hh (100%) rename au/{ => code/au}/units/joules.hh (100%) rename au/{ => code/au}/units/katals.hh (100%) rename au/{ => code/au}/units/kelvins.hh (100%) rename au/{ => code/au}/units/knots.hh (100%) rename au/{ => code/au}/units/liters.hh (100%) rename au/{ => code/au}/units/lumens.hh (100%) rename au/{ => code/au}/units/lux.hh (100%) rename au/{ => code/au}/units/meters.hh (100%) rename au/{ => code/au}/units/miles.hh (100%) rename au/{ => code/au}/units/minutes.hh (100%) rename au/{ => code/au}/units/moles.hh (100%) rename au/{ => code/au}/units/nautical_miles.hh (100%) rename au/{ => code/au}/units/newtons.hh (100%) rename au/{ => code/au}/units/ohms.hh (100%) rename au/{ => code/au}/units/pascals.hh (100%) rename au/{ => code/au}/units/percent.hh (100%) rename au/{ => code/au}/units/pounds_force.hh (100%) rename au/{ => code/au}/units/pounds_mass.hh (100%) rename au/{ => code/au}/units/radians.hh (100%) rename au/{ => code/au}/units/revolutions.hh (100%) rename au/{ => code/au}/units/seconds.hh (100%) rename au/{ => code/au}/units/siemens.hh (100%) rename au/{ => code/au}/units/slugs.hh (100%) rename au/{ => code/au}/units/standard_gravity.hh (100%) rename au/{ => code/au}/units/steradians.hh (100%) rename au/{ => code/au}/units/tesla.hh (100%) rename au/{ => code/au}/units/test/amperes_test.cc (100%) rename au/{ => code/au}/units/test/bars_test.cc (100%) rename au/{ => code/au}/units/test/becquerel_test.cc (100%) rename au/{ => code/au}/units/test/bits_test.cc (100%) rename au/{ => code/au}/units/test/bytes_test.cc (100%) rename au/{ => code/au}/units/test/candelas_test.cc (100%) rename au/{ => code/au}/units/test/celsius_test.cc (100%) rename au/{ => code/au}/units/test/coulombs_test.cc (100%) rename au/{ => code/au}/units/test/days_test.cc (100%) rename au/{ => code/au}/units/test/degrees_test.cc (100%) rename au/{ => code/au}/units/test/fahrenheit_test.cc (100%) rename au/{ => code/au}/units/test/farads_test.cc (100%) rename au/{ => code/au}/units/test/fathoms_test.cc (100%) rename au/{ => code/au}/units/test/feet_test.cc (100%) rename au/{ => code/au}/units/test/furlongs_test.cc (100%) rename au/{ => code/au}/units/test/grams_test.cc (100%) rename au/{ => code/au}/units/test/grays_test.cc (100%) rename au/{ => code/au}/units/test/henries_test.cc (100%) rename au/{ => code/au}/units/test/hertz_test.cc (100%) rename au/{ => code/au}/units/test/hours_test.cc (100%) rename au/{ => code/au}/units/test/inches_test.cc (100%) rename au/{ => code/au}/units/test/joules_test.cc (100%) rename au/{ => code/au}/units/test/katals_test.cc (100%) rename au/{ => code/au}/units/test/kelvins_test.cc (100%) rename au/{ => code/au}/units/test/knots_test.cc (100%) rename au/{ => code/au}/units/test/liters_test.cc (100%) rename au/{ => code/au}/units/test/lumens_test.cc (100%) rename au/{ => code/au}/units/test/lux_test.cc (100%) rename au/{ => code/au}/units/test/meters_test.cc (100%) rename au/{ => code/au}/units/test/miles_test.cc (100%) rename au/{ => code/au}/units/test/minutes_test.cc (100%) rename au/{ => code/au}/units/test/moles_test.cc (100%) rename au/{ => code/au}/units/test/nautical_miles_test.cc (100%) rename au/{ => code/au}/units/test/newtons_test.cc (100%) rename au/{ => code/au}/units/test/ohms_test.cc (100%) rename au/{ => code/au}/units/test/pascals_test.cc (100%) rename au/{ => code/au}/units/test/percent_test.cc (100%) rename au/{ => code/au}/units/test/pounds_force_test.cc (100%) rename au/{ => code/au}/units/test/pounds_mass_test.cc (100%) rename au/{ => code/au}/units/test/radians_test.cc (100%) rename au/{ => code/au}/units/test/revolutions_test.cc (100%) rename au/{ => code/au}/units/test/seconds_test.cc (100%) rename au/{ => code/au}/units/test/siemens_test.cc (100%) rename au/{ => code/au}/units/test/slugs_test.cc (100%) rename au/{ => code/au}/units/test/standard_gravity_test.cc (100%) rename au/{ => code/au}/units/test/steradians_test.cc (100%) rename au/{ => code/au}/units/test/tesla_test.cc (100%) rename au/{ => code/au}/units/test/unos_test.cc (100%) rename au/{ => code/au}/units/test/volts_test.cc (100%) rename au/{ => code/au}/units/test/watts_test.cc (100%) rename au/{ => code/au}/units/test/webers_test.cc (100%) rename au/{ => code/au}/units/test/yards_test.cc (100%) rename au/{ => code/au}/units/unos.hh (100%) rename au/{ => code/au}/units/volts.hh (100%) rename au/{ => code/au}/units/watts.hh (100%) rename au/{ => code/au}/units/webers.hh (100%) rename au/{ => code/au}/units/yards.hh (100%) rename au/{ => code/au}/utility/factoring.hh (100%) rename au/{ => code/au}/utility/string_constant.hh (100%) rename au/{ => code/au}/utility/test/factoring_test.cc (100%) rename au/{ => code/au}/utility/test/string_constant_test.cc (100%) rename au/{ => code/au}/utility/test/type_traits_test.cc (100%) rename au/{ => code/au}/utility/type_traits.hh (100%) rename au/{ => code/au}/wrapper_operations.hh (100%) rename au/{ => code/au}/wrapper_operations_test.cc (100%) rename au/{ => code/au}/zero.hh (100%) rename au/{ => code/au}/zero_test.cc (100%) delete mode 120000 cmake/project_symlinks/au diff --git a/CMakeLists.txt b/CMakeLists.txt index 32620d82..71c3a1a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) FetchContent_MakeAvailable(googletest) include(GoogleTest) -add_subdirectory(cmake/project_symlinks) +add_subdirectory(au) # Configure how Au will be installed. # diff --git a/au/BUILD.bazel b/au/BUILD.bazel index c5ca484d..c17a37ca 100644 --- a/au/BUILD.bazel +++ b/au/BUILD.bazel @@ -19,7 +19,8 @@ load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") cc_library( name = "au", - hdrs = ["au.hh"], + hdrs = ["code/au/au.hh"], + includes = ["code"], visibility = ["//visibility:public"], deps = [ ":chrono_interop", @@ -31,7 +32,7 @@ cc_library( cc_test( name = "au_test", size = "small", - srcs = ["au_test.cc"], + srcs = ["code/au/au_test.cc"], deps = [ ":au", ":testing", @@ -41,7 +42,8 @@ cc_test( cc_library( name = "io", - hdrs = ["io.hh"], + hdrs = ["code/au/io.hh"], + includes = ["code"], visibility = ["//visibility:public"], deps = [ ":quantity", @@ -53,7 +55,7 @@ cc_library( cc_test( name = "io_test", size = "small", - srcs = ["io_test.cc"], + srcs = ["code/au/io_test.cc"], deps = [ ":io", ":prefix", @@ -64,7 +66,8 @@ cc_test( cc_library( name = "testing", testonly = True, - hdrs = ["testing.hh"], + hdrs = ["code/au/testing.hh"], + includes = ["code"], visibility = ["//visibility:public"], deps = [ ":io", @@ -77,7 +80,7 @@ cc_library( cc_test( name = "testing_test", size = "small", - srcs = ["testing_test.cc"], + srcs = ["code/au/testing_test.cc"], deps = [ ":testing", "@com_google_googletest//:gtest_main", @@ -86,7 +89,8 @@ cc_test( cc_library( name = "units", - hdrs = glob(["units/*.hh"]), + hdrs = glob(["code/au/units/*.hh"]), + includes = ["code"], visibility = ["//visibility:public"], deps = [ ":prefix", @@ -100,7 +104,7 @@ cc_library( cc_test( name = "units_test", size = "small", - srcs = glob(["units/test/*.cc"]), + srcs = glob(["code/au/units/test/*.cc"]), deps = [ ":testing", ":units", @@ -113,7 +117,8 @@ cc_test( cc_library( name = "apply_magnitude", - hdrs = ["apply_magnitude.hh"], + hdrs = ["code/au/apply_magnitude.hh"], + includes = ["code"], deps = [ ":apply_rational_magnitude_to_integral", ":magnitude", @@ -123,7 +128,7 @@ cc_library( cc_test( name = "apply_magnitude_test", size = "small", - srcs = ["apply_magnitude_test.cc"], + srcs = ["code/au/apply_magnitude_test.cc"], deps = [ ":apply_magnitude", ":testing", @@ -133,14 +138,15 @@ cc_test( cc_library( name = "apply_rational_magnitude_to_integral", - hdrs = ["apply_rational_magnitude_to_integral.hh"], + hdrs = ["code/au/apply_rational_magnitude_to_integral.hh"], + includes = ["code"], deps = [":magnitude"], ) cc_test( name = "apply_rational_magnitude_to_integral_test", size = "small", - srcs = ["apply_rational_magnitude_to_integral_test.cc"], + srcs = ["code/au/apply_rational_magnitude_to_integral_test.cc"], deps = [ ":apply_rational_magnitude_to_integral", ":testing", @@ -150,7 +156,8 @@ cc_test( cc_library( name = "chrono_interop", - hdrs = ["chrono_interop.hh"], + hdrs = ["code/au/chrono_interop.hh"], + includes = ["code"], deps = [ ":units", ], @@ -159,7 +166,7 @@ cc_library( cc_test( name = "chrono_interop_test", size = "small", - srcs = ["chrono_interop_test.cc"], + srcs = ["code/au/chrono_interop_test.cc"], deps = [ ":chrono_interop", ":prefix", @@ -171,7 +178,8 @@ cc_test( cc_library( name = "chrono_policy_validation", testonly = True, - hdrs = ["chrono_policy_validation.hh"], + hdrs = ["code/au/chrono_policy_validation.hh"], + includes = ["code"], deps = [ ":dimension", ":quantity", @@ -184,7 +192,7 @@ cc_library( cc_test( name = "chrono_policy_validation_test", size = "small", - srcs = ["chrono_policy_validation_test.cc"], + srcs = ["code/au/chrono_policy_validation_test.cc"], deps = [ ":chrono_policy_validation", ":prefix", @@ -195,7 +203,8 @@ cc_test( cc_library( name = "constant", - hdrs = ["constant.hh"], + hdrs = ["code/au/constant.hh"], + includes = ["code"], deps = [ ":quantity", ":unit_of_measure", @@ -206,7 +215,7 @@ cc_library( cc_test( name = "constant_test", size = "small", - srcs = ["constant_test.cc"], + srcs = ["code/au/constant_test.cc"], deps = [ ":chrono_interop", ":constant", @@ -218,7 +227,8 @@ cc_test( cc_library( name = "conversion_policy", - hdrs = ["conversion_policy.hh"], + hdrs = ["code/au/conversion_policy.hh"], + includes = ["code"], deps = [ ":magnitude", ":stdx", @@ -229,7 +239,7 @@ cc_library( cc_test( name = "conversion_policy_test", size = "small", - srcs = ["conversion_policy_test.cc"], + srcs = ["code/au/conversion_policy_test.cc"], deps = [ ":conversion_policy", ":unit_of_measure", @@ -239,7 +249,8 @@ cc_test( cc_library( name = "dimension", - hdrs = ["dimension.hh"], + hdrs = ["code/au/dimension.hh"], + includes = ["code"], deps = [ ":packs", ":power_aliases", @@ -249,7 +260,7 @@ cc_library( cc_test( name = "dimension_test", size = "small", - srcs = ["dimension_test.cc"], + srcs = ["code/au/dimension_test.cc"], deps = [ ":dimension", ":testing", @@ -260,7 +271,8 @@ cc_test( cc_library( name = "magnitude", - hdrs = ["magnitude.hh"], + hdrs = ["code/au/magnitude.hh"], + includes = ["code"], deps = [ ":packs", ":power_aliases", @@ -273,7 +285,7 @@ cc_library( cc_test( name = "magnitude_test", size = "small", - srcs = ["magnitude_test.cc"], + srcs = ["code/au/magnitude_test.cc"], deps = [ ":magnitude", ":testing", @@ -283,7 +295,8 @@ cc_test( cc_library( name = "math", - hdrs = ["math.hh"], + hdrs = ["code/au/math.hh"], + includes = ["code"], deps = [ ":constant", ":quantity", @@ -295,7 +308,7 @@ cc_library( cc_test( name = "math_test", size = "small", - srcs = ["math_test.cc"], + srcs = ["code/au/math_test.cc"], deps = [ ":math", ":testing", @@ -306,7 +319,7 @@ cc_test( cc_test( name = "no_wconversion_test", size = "small", - srcs = ["no_wconversion_test.cc"], + srcs = ["code/au/no_wconversion_test.cc"], deps = [ ":quantity", ":testing", @@ -317,13 +330,14 @@ cc_test( cc_library( name = "operators", - hdrs = ["operators.hh"], + hdrs = ["code/au/operators.hh"], + includes = ["code"], ) cc_test( name = "operators_test", size = "small", - srcs = ["operators_test.cc"], + srcs = ["code/au/operators_test.cc"], deps = [ ":operators", ":testing", @@ -333,7 +347,8 @@ cc_test( cc_library( name = "packs", - hdrs = ["packs.hh"], + hdrs = ["code/au/packs.hh"], + includes = ["code"], deps = [ ":stdx", ":utility", @@ -343,7 +358,7 @@ cc_library( cc_test( name = "packs_test", size = "small", - srcs = ["packs_test.cc"], + srcs = ["code/au/packs_test.cc"], deps = [ ":packs", "@com_google_googletest//:gtest_main", @@ -352,13 +367,14 @@ cc_test( cc_library( name = "power_aliases", - hdrs = ["power_aliases.hh"], + hdrs = ["code/au/power_aliases.hh"], + includes = ["code"], ) cc_test( name = "power_aliases_test", size = "small", - srcs = ["power_aliases_test.cc"], + srcs = ["code/au/power_aliases_test.cc"], deps = [ ":packs", ":power_aliases", @@ -368,7 +384,8 @@ cc_test( cc_library( name = "prefix", - hdrs = ["prefix.hh"], + hdrs = ["code/au/prefix.hh"], + includes = ["code"], deps = [ ":quantity", ":quantity_point", @@ -380,7 +397,7 @@ cc_library( cc_test( name = "prefix_test", size = "small", - srcs = ["prefix_test.cc"], + srcs = ["code/au/prefix_test.cc"], deps = [ ":prefix", ":testing", @@ -390,7 +407,8 @@ cc_test( cc_library( name = "quantity", - hdrs = ["quantity.hh"], + hdrs = ["code/au/quantity.hh"], + includes = ["code"], deps = [ ":apply_magnitude", ":conversion_policy", @@ -405,8 +423,8 @@ cc_test( name = "quantity_test", size = "small", srcs = [ - "quantity_chrono_policy_correspondence_test.cc", - "quantity_test.cc", + "code/au/quantity_chrono_policy_correspondence_test.cc", + "code/au/quantity_test.cc", ], deps = [ ":chrono_policy_validation", @@ -419,7 +437,8 @@ cc_test( cc_library( name = "quantity_point", - hdrs = ["quantity_point.hh"], + hdrs = ["code/au/quantity_point.hh"], + includes = ["code"], deps = [ ":quantity", ":stdx", @@ -430,7 +449,7 @@ cc_library( cc_test( name = "quantity_point_test", size = "small", - srcs = ["quantity_point_test.cc"], + srcs = ["code/au/quantity_point_test.cc"], deps = [ ":prefix", ":quantity_point", @@ -441,14 +460,15 @@ cc_test( cc_library( name = "rep", - hdrs = ["rep.hh"], + hdrs = ["code/au/rep.hh"], + includes = ["code"], deps = [":stdx"], ) cc_test( name = "rep_test", size = "small", - srcs = ["rep_test.cc"], + srcs = ["code/au/rep_test.cc"], deps = [ ":chrono_interop", ":constant", @@ -466,19 +486,20 @@ cc_test( cc_library( name = "stdx", srcs = glob([ - "stdx/*.cc", - "stdx/experimental/*.cc", + "code/au/stdx/*.cc", + "code/au/stdx/experimental/*.cc", ]), hdrs = glob([ - "stdx/*.hh", - "stdx/experimental/*.hh", + "code/au/stdx/*.hh", + "code/au/stdx/experimental/*.hh", ]), + includes = ["code"], ) cc_test( name = "stdx_test", size = "small", - srcs = glob(["stdx/test/*.cc"]), + srcs = glob(["code/au/stdx/test/*.cc"]), deps = [ ":stdx", "@com_google_googletest//:gtest_main", @@ -487,7 +508,8 @@ cc_test( cc_library( name = "unit_of_measure", - hdrs = ["unit_of_measure.hh"], + hdrs = ["code/au/unit_of_measure.hh"], + includes = ["code"], deps = [ ":dimension", ":magnitude", @@ -501,7 +523,7 @@ cc_library( cc_test( name = "unit_of_measure_test", size = "small", - srcs = ["unit_of_measure_test.cc"], + srcs = ["code/au/unit_of_measure_test.cc"], deps = [ ":prefix", ":testing", @@ -513,14 +535,15 @@ cc_test( cc_library( name = "unit_symbol", - hdrs = ["unit_symbol.hh"], + hdrs = ["code/au/unit_symbol.hh"], + includes = ["code"], deps = [":wrapper_operations"], ) cc_test( name = "unit_symbol_test", size = "small", - srcs = ["unit_symbol_test.cc"], + srcs = ["code/au/unit_symbol_test.cc"], deps = [ ":testing", ":unit_symbol", @@ -531,14 +554,15 @@ cc_test( cc_library( name = "utility", - hdrs = glob(["utility/*.hh"]), + hdrs = glob(["code/au/utility/*.hh"]), + includes = ["code"], deps = [":stdx"], ) cc_test( name = "utility_test", size = "small", - srcs = glob(["utility/test/*.cc"]), + srcs = glob(["code/au/utility/test/*.cc"]), deps = [ ":utility", "@com_google_googletest//:gtest_main", @@ -547,7 +571,8 @@ cc_test( cc_library( name = "wrapper_operations", - hdrs = ["wrapper_operations.hh"], + hdrs = ["code/au/wrapper_operations.hh"], + includes = ["code"], deps = [ ":quantity", ":stdx", @@ -557,7 +582,7 @@ cc_library( cc_test( name = "wrapper_operations_test", size = "small", - srcs = ["wrapper_operations_test.cc"], + srcs = ["code/au/wrapper_operations_test.cc"], deps = [ ":testing", ":units", @@ -568,13 +593,14 @@ cc_test( cc_library( name = "zero", - hdrs = ["zero.hh"], + hdrs = ["code/au/zero.hh"], + includes = ["code"], ) cc_test( name = "zero_test", size = "small", - srcs = ["zero_test.cc"], + srcs = ["code/au/zero_test.cc"], deps = [ ":zero", "@com_google_googletest//:gtest_main", @@ -586,7 +612,7 @@ cc_test( filegroup( name = "headers", - srcs = glob(["**/*.hh"]), + srcs = glob(["code/au/**/*.hh"]), visibility = ["//:__pkg__"], ) diff --git a/au/CMakeLists.txt b/au/CMakeLists.txt index 35492412..a3656289 100644 --- a/au/CMakeLists.txt +++ b/au/CMakeLists.txt @@ -12,494 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -include("${PROJECT_SOURCE_DIR}/cmake/HeaderOnlyLibrary.cmake") - -# -# Publicly exported targets -# - -header_only_library( - NAME au - HEADERS - au.hh - DEPS - chrono_interop - constant - math - GTEST_SRCS - au_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME chrono_interop - HEADERS - chrono_interop.hh - DEPS - quantity - units - GTEST_SRCS - chrono_interop_test.cc - GTEST_EXTRA_DEPS - prefix - testing -) - -header_only_library( - NAME constant - HEADERS - constant.hh - DEPS - quantity - unit_of_measure - wrapper_operations - GTEST_SRCS - constant_test.cc - GTEST_EXTRA_DEPS - chrono_interop - testing - units -) - -header_only_library( - NAME io - HEADERS - io.hh - DEPS - quantity - quantity_point - zero - GTEST_SRCS - io_test.cc - GTEST_EXTRA_DEPS - prefix -) - -header_only_library( - NAME math - HEADERS - math.hh - DEPS - constant - quantity - quantity_point - units - GTEST_SRCS - math_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME prefix - HEADERS - prefix.hh - DEPS - quantity - quantity_point - unit_of_measure - unit_symbol - GTEST_SRCS - prefix_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME quantity - HEADERS - quantity.hh - DEPS - apply_magnitude - conversion_policy - operators - rep - unit_of_measure - zero - GTEST_SRCS - quantity_chrono_policy_correspondence_test.cc - quantity_test.cc - GTEST_EXTRA_DEPS - chrono_policy_validation - prefix - testing -) - -header_only_library( - NAME quantity_point - HEADERS - quantity_point.hh - DEPS - quantity - stdx - utility - GTEST_SRCS - quantity_point_test.cc - GTEST_EXTRA_DEPS - prefix - testing -) - -header_only_library( - NAME testing - HEADERS - testing.hh - DEPS - io - stdx - unit_of_measure - GTest::gmock - GTEST_SRCS - testing_test.cc -) - -header_only_library( - NAME units - HEADERS - units/amperes.hh - units/bars.hh - units/becquerel.hh - units/bits.hh - units/bytes.hh - units/candelas.hh - units/celsius.hh - units/coulombs.hh - units/days.hh - units/degrees.hh - units/fahrenheit.hh - units/farads.hh - units/fathoms.hh - units/feet.hh - units/furlongs.hh - units/grams.hh - units/grays.hh - units/henries.hh - units/hertz.hh - units/hours.hh - units/inches.hh - units/joules.hh - units/katals.hh - units/kelvins.hh - units/knots.hh - units/liters.hh - units/lumens.hh - units/lux.hh - units/meters.hh - units/miles.hh - units/minutes.hh - units/moles.hh - units/nautical_miles.hh - units/newtons.hh - units/ohms.hh - units/pascals.hh - units/percent.hh - units/pounds_force.hh - units/pounds_mass.hh - units/radians.hh - units/revolutions.hh - units/seconds.hh - units/siemens.hh - units/slugs.hh - units/standard_gravity.hh - units/steradians.hh - units/tesla.hh - units/unos.hh - units/volts.hh - units/watts.hh - units/webers.hh - units/yards.hh - DEPS - prefix - quantity - quantity_point - unit_of_measure - unit_symbol - GTEST_SRCS - units/test/amperes_test.cc - units/test/bars_test.cc - units/test/becquerel_test.cc - units/test/bits_test.cc - units/test/bytes_test.cc - units/test/candelas_test.cc - units/test/celsius_test.cc - units/test/coulombs_test.cc - units/test/days_test.cc - units/test/degrees_test.cc - units/test/fahrenheit_test.cc - units/test/farads_test.cc - units/test/fathoms_test.cc - units/test/feet_test.cc - units/test/furlongs_test.cc - units/test/grams_test.cc - units/test/grays_test.cc - units/test/henries_test.cc - units/test/hertz_test.cc - units/test/hours_test.cc - units/test/inches_test.cc - units/test/joules_test.cc - units/test/katals_test.cc - units/test/kelvins_test.cc - units/test/knots_test.cc - units/test/liters_test.cc - units/test/lumens_test.cc - units/test/lux_test.cc - units/test/meters_test.cc - units/test/miles_test.cc - units/test/minutes_test.cc - units/test/moles_test.cc - units/test/nautical_miles_test.cc - units/test/newtons_test.cc - units/test/ohms_test.cc - units/test/pascals_test.cc - units/test/percent_test.cc - units/test/pounds_force_test.cc - units/test/pounds_mass_test.cc - units/test/radians_test.cc - units/test/revolutions_test.cc - units/test/seconds_test.cc - units/test/siemens_test.cc - units/test/slugs_test.cc - units/test/standard_gravity_test.cc - units/test/steradians_test.cc - units/test/tesla_test.cc - units/test/unos_test.cc - units/test/volts_test.cc - units/test/watts_test.cc - units/test/webers_test.cc - units/test/yards_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME unit_symbol - HEADERS - unit_symbol.hh - DEPS - wrapper_operations - GTEST_SRCS - unit_symbol_test.cc - GTEST_EXTRA_DEPS - testing - units -) - -# -# Private implementation detail targets -# - -header_only_library( - NAME apply_magnitude - INTERNAL_ONLY - HEADERS - apply_magnitude.hh - DEPS - apply_rational_magnitude_to_integral - GTEST_SRCS - apply_magnitude_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME apply_rational_magnitude_to_integral - INTERNAL_ONLY - HEADERS - apply_rational_magnitude_to_integral.hh - DEPS - magnitude - GTEST_SRCS - apply_rational_magnitude_to_integral_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME chrono_policy_validation - INTERNAL_ONLY - HEADERS - chrono_policy_validation.hh - DEPS - dimension - quantity - stdx - unit_of_measure - GTest::gtest - GTEST_SRCS - chrono_policy_validation_test.cc - GTEST_EXTRA_DEPS - prefix - testing -) - - -header_only_library( - NAME conversion_policy - INTERNAL_ONLY - HEADERS - conversion_policy.hh - DEPS - magnitude - stdx - unit_of_measure - GTEST_SRCS - conversion_policy_test.cc -) - -header_only_library( - NAME dimension - INTERNAL_ONLY - HEADERS - dimension.hh - DEPS - packs - power_aliases - GTEST_SRCS - dimension_test.cc - GTEST_EXTRA_DEPS - testing - units -) - -header_only_library( - NAME magnitude - INTERNAL_ONLY - HEADERS - magnitude.hh - DEPS - packs - power_aliases - stdx - utility - zero - GTEST_SRCS - magnitude_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME operators - INTERNAL_ONLY - HEADERS - operators.hh - GTEST_SRCS - operators_test.cc - GTEST_EXTRA_DEPS - testing -) - -header_only_library( - NAME packs - INTERNAL_ONLY - HEADERS - packs.hh - DEPS - stdx - utility - GTEST_SRCS - packs_test.cc -) - -header_only_library( - NAME power_aliases - INTERNAL_ONLY - HEADERS - power_aliases.hh - GTEST_SRCS - power_aliases_test.cc - GTEST_EXTRA_DEPS - packs -) - -header_only_library( - NAME rep - INTERNAL_ONLY - HEADERS - rep.hh - DEPS - stdx - GTEST_SRCS - rep_test.cc - GTEST_EXTRA_DEPS - chrono_interop - constant - magnitude - prefix - quantity - quantity_point - unit_symbol - units -) - -header_only_library( - NAME stdx - INTERNAL_ONLY - HEADERS - stdx/experimental/is_detected.hh - stdx/functional.hh - stdx/type_traits.hh - stdx/utility.hh - GTEST_SRCS - stdx/test/utility_test.cc -) - -header_only_library( - NAME unit_of_measure - INTERNAL_ONLY - HEADERS - unit_of_measure.hh - DEPS - dimension - magnitude - power_aliases - stdx - utility - zero - GTEST_SRCS - unit_of_measure_test.cc - GTEST_EXTRA_DEPS - prefix - testing - units -) - -header_only_library( - NAME utility - INTERNAL_ONLY - HEADERS - utility/factoring.hh - utility/string_constant.hh - utility/type_traits.hh - DEPS - stdx - GTEST_SRCS - utility/test/factoring_test.cc - utility/test/string_constant_test.cc - utility/test/type_traits_test.cc -) - -header_only_library( - NAME wrapper_operations - INTERNAL_ONLY - HEADERS - wrapper_operations.hh - DEPS - quantity - stdx - GTEST_SRCS - wrapper_operations_test.cc - GTEST_EXTRA_DEPS - testing - units -) - -header_only_library( - NAME zero - INTERNAL_ONLY - HEADERS - zero.hh - GTEST_SRCS - zero_test.cc -) +add_subdirectory(code) diff --git a/cmake/project_symlinks/CMakeLists.txt b/au/code/CMakeLists.txt similarity index 100% rename from cmake/project_symlinks/CMakeLists.txt rename to au/code/CMakeLists.txt diff --git a/au/code/au/CMakeLists.txt b/au/code/au/CMakeLists.txt new file mode 100644 index 00000000..35492412 --- /dev/null +++ b/au/code/au/CMakeLists.txt @@ -0,0 +1,505 @@ +# Copyright 2024 Aurora Operations, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include("${PROJECT_SOURCE_DIR}/cmake/HeaderOnlyLibrary.cmake") + +# +# Publicly exported targets +# + +header_only_library( + NAME au + HEADERS + au.hh + DEPS + chrono_interop + constant + math + GTEST_SRCS + au_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME chrono_interop + HEADERS + chrono_interop.hh + DEPS + quantity + units + GTEST_SRCS + chrono_interop_test.cc + GTEST_EXTRA_DEPS + prefix + testing +) + +header_only_library( + NAME constant + HEADERS + constant.hh + DEPS + quantity + unit_of_measure + wrapper_operations + GTEST_SRCS + constant_test.cc + GTEST_EXTRA_DEPS + chrono_interop + testing + units +) + +header_only_library( + NAME io + HEADERS + io.hh + DEPS + quantity + quantity_point + zero + GTEST_SRCS + io_test.cc + GTEST_EXTRA_DEPS + prefix +) + +header_only_library( + NAME math + HEADERS + math.hh + DEPS + constant + quantity + quantity_point + units + GTEST_SRCS + math_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME prefix + HEADERS + prefix.hh + DEPS + quantity + quantity_point + unit_of_measure + unit_symbol + GTEST_SRCS + prefix_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME quantity + HEADERS + quantity.hh + DEPS + apply_magnitude + conversion_policy + operators + rep + unit_of_measure + zero + GTEST_SRCS + quantity_chrono_policy_correspondence_test.cc + quantity_test.cc + GTEST_EXTRA_DEPS + chrono_policy_validation + prefix + testing +) + +header_only_library( + NAME quantity_point + HEADERS + quantity_point.hh + DEPS + quantity + stdx + utility + GTEST_SRCS + quantity_point_test.cc + GTEST_EXTRA_DEPS + prefix + testing +) + +header_only_library( + NAME testing + HEADERS + testing.hh + DEPS + io + stdx + unit_of_measure + GTest::gmock + GTEST_SRCS + testing_test.cc +) + +header_only_library( + NAME units + HEADERS + units/amperes.hh + units/bars.hh + units/becquerel.hh + units/bits.hh + units/bytes.hh + units/candelas.hh + units/celsius.hh + units/coulombs.hh + units/days.hh + units/degrees.hh + units/fahrenheit.hh + units/farads.hh + units/fathoms.hh + units/feet.hh + units/furlongs.hh + units/grams.hh + units/grays.hh + units/henries.hh + units/hertz.hh + units/hours.hh + units/inches.hh + units/joules.hh + units/katals.hh + units/kelvins.hh + units/knots.hh + units/liters.hh + units/lumens.hh + units/lux.hh + units/meters.hh + units/miles.hh + units/minutes.hh + units/moles.hh + units/nautical_miles.hh + units/newtons.hh + units/ohms.hh + units/pascals.hh + units/percent.hh + units/pounds_force.hh + units/pounds_mass.hh + units/radians.hh + units/revolutions.hh + units/seconds.hh + units/siemens.hh + units/slugs.hh + units/standard_gravity.hh + units/steradians.hh + units/tesla.hh + units/unos.hh + units/volts.hh + units/watts.hh + units/webers.hh + units/yards.hh + DEPS + prefix + quantity + quantity_point + unit_of_measure + unit_symbol + GTEST_SRCS + units/test/amperes_test.cc + units/test/bars_test.cc + units/test/becquerel_test.cc + units/test/bits_test.cc + units/test/bytes_test.cc + units/test/candelas_test.cc + units/test/celsius_test.cc + units/test/coulombs_test.cc + units/test/days_test.cc + units/test/degrees_test.cc + units/test/fahrenheit_test.cc + units/test/farads_test.cc + units/test/fathoms_test.cc + units/test/feet_test.cc + units/test/furlongs_test.cc + units/test/grams_test.cc + units/test/grays_test.cc + units/test/henries_test.cc + units/test/hertz_test.cc + units/test/hours_test.cc + units/test/inches_test.cc + units/test/joules_test.cc + units/test/katals_test.cc + units/test/kelvins_test.cc + units/test/knots_test.cc + units/test/liters_test.cc + units/test/lumens_test.cc + units/test/lux_test.cc + units/test/meters_test.cc + units/test/miles_test.cc + units/test/minutes_test.cc + units/test/moles_test.cc + units/test/nautical_miles_test.cc + units/test/newtons_test.cc + units/test/ohms_test.cc + units/test/pascals_test.cc + units/test/percent_test.cc + units/test/pounds_force_test.cc + units/test/pounds_mass_test.cc + units/test/radians_test.cc + units/test/revolutions_test.cc + units/test/seconds_test.cc + units/test/siemens_test.cc + units/test/slugs_test.cc + units/test/standard_gravity_test.cc + units/test/steradians_test.cc + units/test/tesla_test.cc + units/test/unos_test.cc + units/test/volts_test.cc + units/test/watts_test.cc + units/test/webers_test.cc + units/test/yards_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME unit_symbol + HEADERS + unit_symbol.hh + DEPS + wrapper_operations + GTEST_SRCS + unit_symbol_test.cc + GTEST_EXTRA_DEPS + testing + units +) + +# +# Private implementation detail targets +# + +header_only_library( + NAME apply_magnitude + INTERNAL_ONLY + HEADERS + apply_magnitude.hh + DEPS + apply_rational_magnitude_to_integral + GTEST_SRCS + apply_magnitude_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME apply_rational_magnitude_to_integral + INTERNAL_ONLY + HEADERS + apply_rational_magnitude_to_integral.hh + DEPS + magnitude + GTEST_SRCS + apply_rational_magnitude_to_integral_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME chrono_policy_validation + INTERNAL_ONLY + HEADERS + chrono_policy_validation.hh + DEPS + dimension + quantity + stdx + unit_of_measure + GTest::gtest + GTEST_SRCS + chrono_policy_validation_test.cc + GTEST_EXTRA_DEPS + prefix + testing +) + + +header_only_library( + NAME conversion_policy + INTERNAL_ONLY + HEADERS + conversion_policy.hh + DEPS + magnitude + stdx + unit_of_measure + GTEST_SRCS + conversion_policy_test.cc +) + +header_only_library( + NAME dimension + INTERNAL_ONLY + HEADERS + dimension.hh + DEPS + packs + power_aliases + GTEST_SRCS + dimension_test.cc + GTEST_EXTRA_DEPS + testing + units +) + +header_only_library( + NAME magnitude + INTERNAL_ONLY + HEADERS + magnitude.hh + DEPS + packs + power_aliases + stdx + utility + zero + GTEST_SRCS + magnitude_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME operators + INTERNAL_ONLY + HEADERS + operators.hh + GTEST_SRCS + operators_test.cc + GTEST_EXTRA_DEPS + testing +) + +header_only_library( + NAME packs + INTERNAL_ONLY + HEADERS + packs.hh + DEPS + stdx + utility + GTEST_SRCS + packs_test.cc +) + +header_only_library( + NAME power_aliases + INTERNAL_ONLY + HEADERS + power_aliases.hh + GTEST_SRCS + power_aliases_test.cc + GTEST_EXTRA_DEPS + packs +) + +header_only_library( + NAME rep + INTERNAL_ONLY + HEADERS + rep.hh + DEPS + stdx + GTEST_SRCS + rep_test.cc + GTEST_EXTRA_DEPS + chrono_interop + constant + magnitude + prefix + quantity + quantity_point + unit_symbol + units +) + +header_only_library( + NAME stdx + INTERNAL_ONLY + HEADERS + stdx/experimental/is_detected.hh + stdx/functional.hh + stdx/type_traits.hh + stdx/utility.hh + GTEST_SRCS + stdx/test/utility_test.cc +) + +header_only_library( + NAME unit_of_measure + INTERNAL_ONLY + HEADERS + unit_of_measure.hh + DEPS + dimension + magnitude + power_aliases + stdx + utility + zero + GTEST_SRCS + unit_of_measure_test.cc + GTEST_EXTRA_DEPS + prefix + testing + units +) + +header_only_library( + NAME utility + INTERNAL_ONLY + HEADERS + utility/factoring.hh + utility/string_constant.hh + utility/type_traits.hh + DEPS + stdx + GTEST_SRCS + utility/test/factoring_test.cc + utility/test/string_constant_test.cc + utility/test/type_traits_test.cc +) + +header_only_library( + NAME wrapper_operations + INTERNAL_ONLY + HEADERS + wrapper_operations.hh + DEPS + quantity + stdx + GTEST_SRCS + wrapper_operations_test.cc + GTEST_EXTRA_DEPS + testing + units +) + +header_only_library( + NAME zero + INTERNAL_ONLY + HEADERS + zero.hh + GTEST_SRCS + zero_test.cc +) diff --git a/au/apply_magnitude.hh b/au/code/au/apply_magnitude.hh similarity index 100% rename from au/apply_magnitude.hh rename to au/code/au/apply_magnitude.hh diff --git a/au/apply_magnitude_test.cc b/au/code/au/apply_magnitude_test.cc similarity index 100% rename from au/apply_magnitude_test.cc rename to au/code/au/apply_magnitude_test.cc diff --git a/au/apply_rational_magnitude_to_integral.hh b/au/code/au/apply_rational_magnitude_to_integral.hh similarity index 100% rename from au/apply_rational_magnitude_to_integral.hh rename to au/code/au/apply_rational_magnitude_to_integral.hh diff --git a/au/apply_rational_magnitude_to_integral_test.cc b/au/code/au/apply_rational_magnitude_to_integral_test.cc similarity index 100% rename from au/apply_rational_magnitude_to_integral_test.cc rename to au/code/au/apply_rational_magnitude_to_integral_test.cc diff --git a/au/au.hh b/au/code/au/au.hh similarity index 100% rename from au/au.hh rename to au/code/au/au.hh diff --git a/au/au_test.cc b/au/code/au/au_test.cc similarity index 100% rename from au/au_test.cc rename to au/code/au/au_test.cc diff --git a/au/chrono_interop.hh b/au/code/au/chrono_interop.hh similarity index 100% rename from au/chrono_interop.hh rename to au/code/au/chrono_interop.hh diff --git a/au/chrono_interop_test.cc b/au/code/au/chrono_interop_test.cc similarity index 100% rename from au/chrono_interop_test.cc rename to au/code/au/chrono_interop_test.cc diff --git a/au/chrono_policy_validation.hh b/au/code/au/chrono_policy_validation.hh similarity index 100% rename from au/chrono_policy_validation.hh rename to au/code/au/chrono_policy_validation.hh diff --git a/au/chrono_policy_validation_test.cc b/au/code/au/chrono_policy_validation_test.cc similarity index 100% rename from au/chrono_policy_validation_test.cc rename to au/code/au/chrono_policy_validation_test.cc diff --git a/au/constant.hh b/au/code/au/constant.hh similarity index 100% rename from au/constant.hh rename to au/code/au/constant.hh diff --git a/au/constant_test.cc b/au/code/au/constant_test.cc similarity index 100% rename from au/constant_test.cc rename to au/code/au/constant_test.cc diff --git a/au/conversion_policy.hh b/au/code/au/conversion_policy.hh similarity index 100% rename from au/conversion_policy.hh rename to au/code/au/conversion_policy.hh diff --git a/au/conversion_policy_test.cc b/au/code/au/conversion_policy_test.cc similarity index 100% rename from au/conversion_policy_test.cc rename to au/code/au/conversion_policy_test.cc diff --git a/au/dimension.hh b/au/code/au/dimension.hh similarity index 100% rename from au/dimension.hh rename to au/code/au/dimension.hh diff --git a/au/dimension_test.cc b/au/code/au/dimension_test.cc similarity index 100% rename from au/dimension_test.cc rename to au/code/au/dimension_test.cc diff --git a/au/io.hh b/au/code/au/io.hh similarity index 100% rename from au/io.hh rename to au/code/au/io.hh diff --git a/au/io_test.cc b/au/code/au/io_test.cc similarity index 100% rename from au/io_test.cc rename to au/code/au/io_test.cc diff --git a/au/magnitude.hh b/au/code/au/magnitude.hh similarity index 100% rename from au/magnitude.hh rename to au/code/au/magnitude.hh diff --git a/au/magnitude_test.cc b/au/code/au/magnitude_test.cc similarity index 100% rename from au/magnitude_test.cc rename to au/code/au/magnitude_test.cc diff --git a/au/math.hh b/au/code/au/math.hh similarity index 100% rename from au/math.hh rename to au/code/au/math.hh diff --git a/au/math_test.cc b/au/code/au/math_test.cc similarity index 100% rename from au/math_test.cc rename to au/code/au/math_test.cc diff --git a/au/no_wconversion_test.cc b/au/code/au/no_wconversion_test.cc similarity index 100% rename from au/no_wconversion_test.cc rename to au/code/au/no_wconversion_test.cc diff --git a/au/operators.hh b/au/code/au/operators.hh similarity index 100% rename from au/operators.hh rename to au/code/au/operators.hh diff --git a/au/operators_test.cc b/au/code/au/operators_test.cc similarity index 100% rename from au/operators_test.cc rename to au/code/au/operators_test.cc diff --git a/au/packs.hh b/au/code/au/packs.hh similarity index 100% rename from au/packs.hh rename to au/code/au/packs.hh diff --git a/au/packs_test.cc b/au/code/au/packs_test.cc similarity index 100% rename from au/packs_test.cc rename to au/code/au/packs_test.cc diff --git a/au/power_aliases.hh b/au/code/au/power_aliases.hh similarity index 100% rename from au/power_aliases.hh rename to au/code/au/power_aliases.hh diff --git a/au/power_aliases_test.cc b/au/code/au/power_aliases_test.cc similarity index 100% rename from au/power_aliases_test.cc rename to au/code/au/power_aliases_test.cc diff --git a/au/prefix.hh b/au/code/au/prefix.hh similarity index 100% rename from au/prefix.hh rename to au/code/au/prefix.hh diff --git a/au/prefix_test.cc b/au/code/au/prefix_test.cc similarity index 100% rename from au/prefix_test.cc rename to au/code/au/prefix_test.cc diff --git a/au/quantity.hh b/au/code/au/quantity.hh similarity index 100% rename from au/quantity.hh rename to au/code/au/quantity.hh diff --git a/au/quantity_chrono_policy_correspondence_test.cc b/au/code/au/quantity_chrono_policy_correspondence_test.cc similarity index 100% rename from au/quantity_chrono_policy_correspondence_test.cc rename to au/code/au/quantity_chrono_policy_correspondence_test.cc diff --git a/au/quantity_point.hh b/au/code/au/quantity_point.hh similarity index 100% rename from au/quantity_point.hh rename to au/code/au/quantity_point.hh diff --git a/au/quantity_point_test.cc b/au/code/au/quantity_point_test.cc similarity index 100% rename from au/quantity_point_test.cc rename to au/code/au/quantity_point_test.cc diff --git a/au/quantity_test.cc b/au/code/au/quantity_test.cc similarity index 100% rename from au/quantity_test.cc rename to au/code/au/quantity_test.cc diff --git a/au/rep.hh b/au/code/au/rep.hh similarity index 100% rename from au/rep.hh rename to au/code/au/rep.hh diff --git a/au/rep_test.cc b/au/code/au/rep_test.cc similarity index 100% rename from au/rep_test.cc rename to au/code/au/rep_test.cc diff --git a/au/stdx/experimental/is_detected.hh b/au/code/au/stdx/experimental/is_detected.hh similarity index 100% rename from au/stdx/experimental/is_detected.hh rename to au/code/au/stdx/experimental/is_detected.hh diff --git a/au/stdx/functional.hh b/au/code/au/stdx/functional.hh similarity index 100% rename from au/stdx/functional.hh rename to au/code/au/stdx/functional.hh diff --git a/au/stdx/test/utility_test.cc b/au/code/au/stdx/test/utility_test.cc similarity index 100% rename from au/stdx/test/utility_test.cc rename to au/code/au/stdx/test/utility_test.cc diff --git a/au/stdx/type_traits.hh b/au/code/au/stdx/type_traits.hh similarity index 100% rename from au/stdx/type_traits.hh rename to au/code/au/stdx/type_traits.hh diff --git a/au/stdx/utility.hh b/au/code/au/stdx/utility.hh similarity index 100% rename from au/stdx/utility.hh rename to au/code/au/stdx/utility.hh diff --git a/au/testing.hh b/au/code/au/testing.hh similarity index 100% rename from au/testing.hh rename to au/code/au/testing.hh diff --git a/au/testing_test.cc b/au/code/au/testing_test.cc similarity index 100% rename from au/testing_test.cc rename to au/code/au/testing_test.cc diff --git a/au/unit_of_measure.hh b/au/code/au/unit_of_measure.hh similarity index 100% rename from au/unit_of_measure.hh rename to au/code/au/unit_of_measure.hh diff --git a/au/unit_of_measure_test.cc b/au/code/au/unit_of_measure_test.cc similarity index 100% rename from au/unit_of_measure_test.cc rename to au/code/au/unit_of_measure_test.cc diff --git a/au/unit_symbol.hh b/au/code/au/unit_symbol.hh similarity index 100% rename from au/unit_symbol.hh rename to au/code/au/unit_symbol.hh diff --git a/au/unit_symbol_test.cc b/au/code/au/unit_symbol_test.cc similarity index 100% rename from au/unit_symbol_test.cc rename to au/code/au/unit_symbol_test.cc diff --git a/au/units/amperes.hh b/au/code/au/units/amperes.hh similarity index 100% rename from au/units/amperes.hh rename to au/code/au/units/amperes.hh diff --git a/au/units/bars.hh b/au/code/au/units/bars.hh similarity index 100% rename from au/units/bars.hh rename to au/code/au/units/bars.hh diff --git a/au/units/becquerel.hh b/au/code/au/units/becquerel.hh similarity index 100% rename from au/units/becquerel.hh rename to au/code/au/units/becquerel.hh diff --git a/au/units/bits.hh b/au/code/au/units/bits.hh similarity index 100% rename from au/units/bits.hh rename to au/code/au/units/bits.hh diff --git a/au/units/bytes.hh b/au/code/au/units/bytes.hh similarity index 100% rename from au/units/bytes.hh rename to au/code/au/units/bytes.hh diff --git a/au/units/candelas.hh b/au/code/au/units/candelas.hh similarity index 100% rename from au/units/candelas.hh rename to au/code/au/units/candelas.hh diff --git a/au/units/celsius.hh b/au/code/au/units/celsius.hh similarity index 100% rename from au/units/celsius.hh rename to au/code/au/units/celsius.hh diff --git a/au/units/coulombs.hh b/au/code/au/units/coulombs.hh similarity index 100% rename from au/units/coulombs.hh rename to au/code/au/units/coulombs.hh diff --git a/au/units/days.hh b/au/code/au/units/days.hh similarity index 100% rename from au/units/days.hh rename to au/code/au/units/days.hh diff --git a/au/units/degrees.hh b/au/code/au/units/degrees.hh similarity index 100% rename from au/units/degrees.hh rename to au/code/au/units/degrees.hh diff --git a/au/units/fahrenheit.hh b/au/code/au/units/fahrenheit.hh similarity index 100% rename from au/units/fahrenheit.hh rename to au/code/au/units/fahrenheit.hh diff --git a/au/units/farads.hh b/au/code/au/units/farads.hh similarity index 100% rename from au/units/farads.hh rename to au/code/au/units/farads.hh diff --git a/au/units/fathoms.hh b/au/code/au/units/fathoms.hh similarity index 100% rename from au/units/fathoms.hh rename to au/code/au/units/fathoms.hh diff --git a/au/units/feet.hh b/au/code/au/units/feet.hh similarity index 100% rename from au/units/feet.hh rename to au/code/au/units/feet.hh diff --git a/au/units/furlongs.hh b/au/code/au/units/furlongs.hh similarity index 100% rename from au/units/furlongs.hh rename to au/code/au/units/furlongs.hh diff --git a/au/units/grams.hh b/au/code/au/units/grams.hh similarity index 100% rename from au/units/grams.hh rename to au/code/au/units/grams.hh diff --git a/au/units/grays.hh b/au/code/au/units/grays.hh similarity index 100% rename from au/units/grays.hh rename to au/code/au/units/grays.hh diff --git a/au/units/henries.hh b/au/code/au/units/henries.hh similarity index 100% rename from au/units/henries.hh rename to au/code/au/units/henries.hh diff --git a/au/units/hertz.hh b/au/code/au/units/hertz.hh similarity index 100% rename from au/units/hertz.hh rename to au/code/au/units/hertz.hh diff --git a/au/units/hours.hh b/au/code/au/units/hours.hh similarity index 100% rename from au/units/hours.hh rename to au/code/au/units/hours.hh diff --git a/au/units/inches.hh b/au/code/au/units/inches.hh similarity index 100% rename from au/units/inches.hh rename to au/code/au/units/inches.hh diff --git a/au/units/joules.hh b/au/code/au/units/joules.hh similarity index 100% rename from au/units/joules.hh rename to au/code/au/units/joules.hh diff --git a/au/units/katals.hh b/au/code/au/units/katals.hh similarity index 100% rename from au/units/katals.hh rename to au/code/au/units/katals.hh diff --git a/au/units/kelvins.hh b/au/code/au/units/kelvins.hh similarity index 100% rename from au/units/kelvins.hh rename to au/code/au/units/kelvins.hh diff --git a/au/units/knots.hh b/au/code/au/units/knots.hh similarity index 100% rename from au/units/knots.hh rename to au/code/au/units/knots.hh diff --git a/au/units/liters.hh b/au/code/au/units/liters.hh similarity index 100% rename from au/units/liters.hh rename to au/code/au/units/liters.hh diff --git a/au/units/lumens.hh b/au/code/au/units/lumens.hh similarity index 100% rename from au/units/lumens.hh rename to au/code/au/units/lumens.hh diff --git a/au/units/lux.hh b/au/code/au/units/lux.hh similarity index 100% rename from au/units/lux.hh rename to au/code/au/units/lux.hh diff --git a/au/units/meters.hh b/au/code/au/units/meters.hh similarity index 100% rename from au/units/meters.hh rename to au/code/au/units/meters.hh diff --git a/au/units/miles.hh b/au/code/au/units/miles.hh similarity index 100% rename from au/units/miles.hh rename to au/code/au/units/miles.hh diff --git a/au/units/minutes.hh b/au/code/au/units/minutes.hh similarity index 100% rename from au/units/minutes.hh rename to au/code/au/units/minutes.hh diff --git a/au/units/moles.hh b/au/code/au/units/moles.hh similarity index 100% rename from au/units/moles.hh rename to au/code/au/units/moles.hh diff --git a/au/units/nautical_miles.hh b/au/code/au/units/nautical_miles.hh similarity index 100% rename from au/units/nautical_miles.hh rename to au/code/au/units/nautical_miles.hh diff --git a/au/units/newtons.hh b/au/code/au/units/newtons.hh similarity index 100% rename from au/units/newtons.hh rename to au/code/au/units/newtons.hh diff --git a/au/units/ohms.hh b/au/code/au/units/ohms.hh similarity index 100% rename from au/units/ohms.hh rename to au/code/au/units/ohms.hh diff --git a/au/units/pascals.hh b/au/code/au/units/pascals.hh similarity index 100% rename from au/units/pascals.hh rename to au/code/au/units/pascals.hh diff --git a/au/units/percent.hh b/au/code/au/units/percent.hh similarity index 100% rename from au/units/percent.hh rename to au/code/au/units/percent.hh diff --git a/au/units/pounds_force.hh b/au/code/au/units/pounds_force.hh similarity index 100% rename from au/units/pounds_force.hh rename to au/code/au/units/pounds_force.hh diff --git a/au/units/pounds_mass.hh b/au/code/au/units/pounds_mass.hh similarity index 100% rename from au/units/pounds_mass.hh rename to au/code/au/units/pounds_mass.hh diff --git a/au/units/radians.hh b/au/code/au/units/radians.hh similarity index 100% rename from au/units/radians.hh rename to au/code/au/units/radians.hh diff --git a/au/units/revolutions.hh b/au/code/au/units/revolutions.hh similarity index 100% rename from au/units/revolutions.hh rename to au/code/au/units/revolutions.hh diff --git a/au/units/seconds.hh b/au/code/au/units/seconds.hh similarity index 100% rename from au/units/seconds.hh rename to au/code/au/units/seconds.hh diff --git a/au/units/siemens.hh b/au/code/au/units/siemens.hh similarity index 100% rename from au/units/siemens.hh rename to au/code/au/units/siemens.hh diff --git a/au/units/slugs.hh b/au/code/au/units/slugs.hh similarity index 100% rename from au/units/slugs.hh rename to au/code/au/units/slugs.hh diff --git a/au/units/standard_gravity.hh b/au/code/au/units/standard_gravity.hh similarity index 100% rename from au/units/standard_gravity.hh rename to au/code/au/units/standard_gravity.hh diff --git a/au/units/steradians.hh b/au/code/au/units/steradians.hh similarity index 100% rename from au/units/steradians.hh rename to au/code/au/units/steradians.hh diff --git a/au/units/tesla.hh b/au/code/au/units/tesla.hh similarity index 100% rename from au/units/tesla.hh rename to au/code/au/units/tesla.hh diff --git a/au/units/test/amperes_test.cc b/au/code/au/units/test/amperes_test.cc similarity index 100% rename from au/units/test/amperes_test.cc rename to au/code/au/units/test/amperes_test.cc diff --git a/au/units/test/bars_test.cc b/au/code/au/units/test/bars_test.cc similarity index 100% rename from au/units/test/bars_test.cc rename to au/code/au/units/test/bars_test.cc diff --git a/au/units/test/becquerel_test.cc b/au/code/au/units/test/becquerel_test.cc similarity index 100% rename from au/units/test/becquerel_test.cc rename to au/code/au/units/test/becquerel_test.cc diff --git a/au/units/test/bits_test.cc b/au/code/au/units/test/bits_test.cc similarity index 100% rename from au/units/test/bits_test.cc rename to au/code/au/units/test/bits_test.cc diff --git a/au/units/test/bytes_test.cc b/au/code/au/units/test/bytes_test.cc similarity index 100% rename from au/units/test/bytes_test.cc rename to au/code/au/units/test/bytes_test.cc diff --git a/au/units/test/candelas_test.cc b/au/code/au/units/test/candelas_test.cc similarity index 100% rename from au/units/test/candelas_test.cc rename to au/code/au/units/test/candelas_test.cc diff --git a/au/units/test/celsius_test.cc b/au/code/au/units/test/celsius_test.cc similarity index 100% rename from au/units/test/celsius_test.cc rename to au/code/au/units/test/celsius_test.cc diff --git a/au/units/test/coulombs_test.cc b/au/code/au/units/test/coulombs_test.cc similarity index 100% rename from au/units/test/coulombs_test.cc rename to au/code/au/units/test/coulombs_test.cc diff --git a/au/units/test/days_test.cc b/au/code/au/units/test/days_test.cc similarity index 100% rename from au/units/test/days_test.cc rename to au/code/au/units/test/days_test.cc diff --git a/au/units/test/degrees_test.cc b/au/code/au/units/test/degrees_test.cc similarity index 100% rename from au/units/test/degrees_test.cc rename to au/code/au/units/test/degrees_test.cc diff --git a/au/units/test/fahrenheit_test.cc b/au/code/au/units/test/fahrenheit_test.cc similarity index 100% rename from au/units/test/fahrenheit_test.cc rename to au/code/au/units/test/fahrenheit_test.cc diff --git a/au/units/test/farads_test.cc b/au/code/au/units/test/farads_test.cc similarity index 100% rename from au/units/test/farads_test.cc rename to au/code/au/units/test/farads_test.cc diff --git a/au/units/test/fathoms_test.cc b/au/code/au/units/test/fathoms_test.cc similarity index 100% rename from au/units/test/fathoms_test.cc rename to au/code/au/units/test/fathoms_test.cc diff --git a/au/units/test/feet_test.cc b/au/code/au/units/test/feet_test.cc similarity index 100% rename from au/units/test/feet_test.cc rename to au/code/au/units/test/feet_test.cc diff --git a/au/units/test/furlongs_test.cc b/au/code/au/units/test/furlongs_test.cc similarity index 100% rename from au/units/test/furlongs_test.cc rename to au/code/au/units/test/furlongs_test.cc diff --git a/au/units/test/grams_test.cc b/au/code/au/units/test/grams_test.cc similarity index 100% rename from au/units/test/grams_test.cc rename to au/code/au/units/test/grams_test.cc diff --git a/au/units/test/grays_test.cc b/au/code/au/units/test/grays_test.cc similarity index 100% rename from au/units/test/grays_test.cc rename to au/code/au/units/test/grays_test.cc diff --git a/au/units/test/henries_test.cc b/au/code/au/units/test/henries_test.cc similarity index 100% rename from au/units/test/henries_test.cc rename to au/code/au/units/test/henries_test.cc diff --git a/au/units/test/hertz_test.cc b/au/code/au/units/test/hertz_test.cc similarity index 100% rename from au/units/test/hertz_test.cc rename to au/code/au/units/test/hertz_test.cc diff --git a/au/units/test/hours_test.cc b/au/code/au/units/test/hours_test.cc similarity index 100% rename from au/units/test/hours_test.cc rename to au/code/au/units/test/hours_test.cc diff --git a/au/units/test/inches_test.cc b/au/code/au/units/test/inches_test.cc similarity index 100% rename from au/units/test/inches_test.cc rename to au/code/au/units/test/inches_test.cc diff --git a/au/units/test/joules_test.cc b/au/code/au/units/test/joules_test.cc similarity index 100% rename from au/units/test/joules_test.cc rename to au/code/au/units/test/joules_test.cc diff --git a/au/units/test/katals_test.cc b/au/code/au/units/test/katals_test.cc similarity index 100% rename from au/units/test/katals_test.cc rename to au/code/au/units/test/katals_test.cc diff --git a/au/units/test/kelvins_test.cc b/au/code/au/units/test/kelvins_test.cc similarity index 100% rename from au/units/test/kelvins_test.cc rename to au/code/au/units/test/kelvins_test.cc diff --git a/au/units/test/knots_test.cc b/au/code/au/units/test/knots_test.cc similarity index 100% rename from au/units/test/knots_test.cc rename to au/code/au/units/test/knots_test.cc diff --git a/au/units/test/liters_test.cc b/au/code/au/units/test/liters_test.cc similarity index 100% rename from au/units/test/liters_test.cc rename to au/code/au/units/test/liters_test.cc diff --git a/au/units/test/lumens_test.cc b/au/code/au/units/test/lumens_test.cc similarity index 100% rename from au/units/test/lumens_test.cc rename to au/code/au/units/test/lumens_test.cc diff --git a/au/units/test/lux_test.cc b/au/code/au/units/test/lux_test.cc similarity index 100% rename from au/units/test/lux_test.cc rename to au/code/au/units/test/lux_test.cc diff --git a/au/units/test/meters_test.cc b/au/code/au/units/test/meters_test.cc similarity index 100% rename from au/units/test/meters_test.cc rename to au/code/au/units/test/meters_test.cc diff --git a/au/units/test/miles_test.cc b/au/code/au/units/test/miles_test.cc similarity index 100% rename from au/units/test/miles_test.cc rename to au/code/au/units/test/miles_test.cc diff --git a/au/units/test/minutes_test.cc b/au/code/au/units/test/minutes_test.cc similarity index 100% rename from au/units/test/minutes_test.cc rename to au/code/au/units/test/minutes_test.cc diff --git a/au/units/test/moles_test.cc b/au/code/au/units/test/moles_test.cc similarity index 100% rename from au/units/test/moles_test.cc rename to au/code/au/units/test/moles_test.cc diff --git a/au/units/test/nautical_miles_test.cc b/au/code/au/units/test/nautical_miles_test.cc similarity index 100% rename from au/units/test/nautical_miles_test.cc rename to au/code/au/units/test/nautical_miles_test.cc diff --git a/au/units/test/newtons_test.cc b/au/code/au/units/test/newtons_test.cc similarity index 100% rename from au/units/test/newtons_test.cc rename to au/code/au/units/test/newtons_test.cc diff --git a/au/units/test/ohms_test.cc b/au/code/au/units/test/ohms_test.cc similarity index 100% rename from au/units/test/ohms_test.cc rename to au/code/au/units/test/ohms_test.cc diff --git a/au/units/test/pascals_test.cc b/au/code/au/units/test/pascals_test.cc similarity index 100% rename from au/units/test/pascals_test.cc rename to au/code/au/units/test/pascals_test.cc diff --git a/au/units/test/percent_test.cc b/au/code/au/units/test/percent_test.cc similarity index 100% rename from au/units/test/percent_test.cc rename to au/code/au/units/test/percent_test.cc diff --git a/au/units/test/pounds_force_test.cc b/au/code/au/units/test/pounds_force_test.cc similarity index 100% rename from au/units/test/pounds_force_test.cc rename to au/code/au/units/test/pounds_force_test.cc diff --git a/au/units/test/pounds_mass_test.cc b/au/code/au/units/test/pounds_mass_test.cc similarity index 100% rename from au/units/test/pounds_mass_test.cc rename to au/code/au/units/test/pounds_mass_test.cc diff --git a/au/units/test/radians_test.cc b/au/code/au/units/test/radians_test.cc similarity index 100% rename from au/units/test/radians_test.cc rename to au/code/au/units/test/radians_test.cc diff --git a/au/units/test/revolutions_test.cc b/au/code/au/units/test/revolutions_test.cc similarity index 100% rename from au/units/test/revolutions_test.cc rename to au/code/au/units/test/revolutions_test.cc diff --git a/au/units/test/seconds_test.cc b/au/code/au/units/test/seconds_test.cc similarity index 100% rename from au/units/test/seconds_test.cc rename to au/code/au/units/test/seconds_test.cc diff --git a/au/units/test/siemens_test.cc b/au/code/au/units/test/siemens_test.cc similarity index 100% rename from au/units/test/siemens_test.cc rename to au/code/au/units/test/siemens_test.cc diff --git a/au/units/test/slugs_test.cc b/au/code/au/units/test/slugs_test.cc similarity index 100% rename from au/units/test/slugs_test.cc rename to au/code/au/units/test/slugs_test.cc diff --git a/au/units/test/standard_gravity_test.cc b/au/code/au/units/test/standard_gravity_test.cc similarity index 100% rename from au/units/test/standard_gravity_test.cc rename to au/code/au/units/test/standard_gravity_test.cc diff --git a/au/units/test/steradians_test.cc b/au/code/au/units/test/steradians_test.cc similarity index 100% rename from au/units/test/steradians_test.cc rename to au/code/au/units/test/steradians_test.cc diff --git a/au/units/test/tesla_test.cc b/au/code/au/units/test/tesla_test.cc similarity index 100% rename from au/units/test/tesla_test.cc rename to au/code/au/units/test/tesla_test.cc diff --git a/au/units/test/unos_test.cc b/au/code/au/units/test/unos_test.cc similarity index 100% rename from au/units/test/unos_test.cc rename to au/code/au/units/test/unos_test.cc diff --git a/au/units/test/volts_test.cc b/au/code/au/units/test/volts_test.cc similarity index 100% rename from au/units/test/volts_test.cc rename to au/code/au/units/test/volts_test.cc diff --git a/au/units/test/watts_test.cc b/au/code/au/units/test/watts_test.cc similarity index 100% rename from au/units/test/watts_test.cc rename to au/code/au/units/test/watts_test.cc diff --git a/au/units/test/webers_test.cc b/au/code/au/units/test/webers_test.cc similarity index 100% rename from au/units/test/webers_test.cc rename to au/code/au/units/test/webers_test.cc diff --git a/au/units/test/yards_test.cc b/au/code/au/units/test/yards_test.cc similarity index 100% rename from au/units/test/yards_test.cc rename to au/code/au/units/test/yards_test.cc diff --git a/au/units/unos.hh b/au/code/au/units/unos.hh similarity index 100% rename from au/units/unos.hh rename to au/code/au/units/unos.hh diff --git a/au/units/volts.hh b/au/code/au/units/volts.hh similarity index 100% rename from au/units/volts.hh rename to au/code/au/units/volts.hh diff --git a/au/units/watts.hh b/au/code/au/units/watts.hh similarity index 100% rename from au/units/watts.hh rename to au/code/au/units/watts.hh diff --git a/au/units/webers.hh b/au/code/au/units/webers.hh similarity index 100% rename from au/units/webers.hh rename to au/code/au/units/webers.hh diff --git a/au/units/yards.hh b/au/code/au/units/yards.hh similarity index 100% rename from au/units/yards.hh rename to au/code/au/units/yards.hh diff --git a/au/utility/factoring.hh b/au/code/au/utility/factoring.hh similarity index 100% rename from au/utility/factoring.hh rename to au/code/au/utility/factoring.hh diff --git a/au/utility/string_constant.hh b/au/code/au/utility/string_constant.hh similarity index 100% rename from au/utility/string_constant.hh rename to au/code/au/utility/string_constant.hh diff --git a/au/utility/test/factoring_test.cc b/au/code/au/utility/test/factoring_test.cc similarity index 100% rename from au/utility/test/factoring_test.cc rename to au/code/au/utility/test/factoring_test.cc diff --git a/au/utility/test/string_constant_test.cc b/au/code/au/utility/test/string_constant_test.cc similarity index 100% rename from au/utility/test/string_constant_test.cc rename to au/code/au/utility/test/string_constant_test.cc diff --git a/au/utility/test/type_traits_test.cc b/au/code/au/utility/test/type_traits_test.cc similarity index 100% rename from au/utility/test/type_traits_test.cc rename to au/code/au/utility/test/type_traits_test.cc diff --git a/au/utility/type_traits.hh b/au/code/au/utility/type_traits.hh similarity index 100% rename from au/utility/type_traits.hh rename to au/code/au/utility/type_traits.hh diff --git a/au/wrapper_operations.hh b/au/code/au/wrapper_operations.hh similarity index 100% rename from au/wrapper_operations.hh rename to au/code/au/wrapper_operations.hh diff --git a/au/wrapper_operations_test.cc b/au/code/au/wrapper_operations_test.cc similarity index 100% rename from au/wrapper_operations_test.cc rename to au/code/au/wrapper_operations_test.cc diff --git a/au/zero.hh b/au/code/au/zero.hh similarity index 100% rename from au/zero.hh rename to au/code/au/zero.hh diff --git a/au/zero_test.cc b/au/code/au/zero_test.cc similarity index 100% rename from au/zero_test.cc rename to au/code/au/zero_test.cc diff --git a/cmake/HeaderOnlyLibrary.cmake b/cmake/HeaderOnlyLibrary.cmake index aa1c7da0..28daf006 100644 --- a/cmake/HeaderOnlyLibrary.cmake +++ b/cmake/HeaderOnlyLibrary.cmake @@ -45,7 +45,7 @@ function(header_only_library) ${ARG_NAME} INTERFACE FILE_SET HEADERS - BASE_DIRS "${PROJECT_SOURCE_DIR}/cmake/project_symlinks" + BASE_DIRS "${PROJECT_SOURCE_DIR}/au/code" FILES ${ARG_HEADERS} ) if (DEFINED ARG_DEPS) diff --git a/cmake/project_symlinks/au b/cmake/project_symlinks/au deleted file mode 120000 index d3a01f93..00000000 --- a/cmake/project_symlinks/au +++ /dev/null @@ -1 +0,0 @@ -../../au \ No newline at end of file diff --git a/tools/bin/make-single-file b/tools/bin/make-single-file index ec054ec8..f9a0d78e 100755 --- a/tools/bin/make-single-file +++ b/tools/bin/make-single-file @@ -109,7 +109,7 @@ def enumerate_units(args): with every existing entry, and then delete `--all-units`. """ if args.all_units: - args.units = [f[:-3] for f in os.listdir("au/units/") if f.endswith('.hh')] + args.units = [f[:-3] for f in os.listdir("au/code/au/units/") if f.endswith(".hh")] del args.all_units return args @@ -147,7 +147,7 @@ class SourceFile: self.lines = [] in_copyright_header = False - with open(filename) as f: + with open(os.path.join("au/code", filename)) as f: was_last_line_blank = False for line in f: if line.startswith("#pragma once"):