Skip to content

Commit

Permalink
Overhaul rational types (#169)
Browse files Browse the repository at this point in the history
* Add multiprecision rational number support

Implemented classes and traits for multiprecision rational number arithmetic, comparisons, and conversions. Added extensive unit tests to validate the functionality and included configuration in CMakeLists.

* Implement rational arithmetic operations in RationalArithmetic

This commit adds methods for in-place addition, subtraction, multiplication, and division of rational numbers using the GMP library. It ensures the methods check for non-null pointers before proceeding with operations to avoid null pointer dereference.

* Add comparison functions to RationalComparison class

Implemented functions for comparing rational numbers using GMP library. This includes checks for equality, less than, less than or equal to, greater than, and greater than or equal to. Assertions ensure the pointers are not null before performing comparisons.

* Add mathematical operations to RationalNumber

Implement the RationalNumber class with functions for abs, pow, real, imaginary, and from_rational operations. Utilize GMP library for precise arithmetic and add necessary assertions for debugging.

* Enable trait retrieval for RationalType

Restored the switch statement in `get_builtin_trait` to enable retrieval of built-in traits for comparison, arithmetic, and number operations. Added a fallback with `RPY_UNREACHABLE_RETURN(nullptr)` to handle unexpected cases safely.

* Trim null bytes from rational number string buffer

This change ensures that null bytes at the end of the string buffer are removed after converting the rational number to a string. This prevents potential issues with string display or further processing where null bytes might interfere.

* Remove redundant newline in rational_type.cpp

A redundant newline was removed from the buffer initialization section. This change improves the code readability by keeping the formatting neat and consistent. No functional code was affected by this modification.

* Add integer arithmetic and type system to multiprecision types

Implemented IntegerType and IntegerArithmetic classes along with relevant header and source files. Added unit tests for the IntegerType class and integrated them into the build system. Updated rational_type test for consistency.

* Fix uninitialized integer_type in MultiPrecisionTypes constructor

Added initialization of `integer_type` with `IntegerType::get()` to ensure it is not left as a null pointer. Also included a call to `ignore

* Rename IntegerType identifiers for clarity

Changed the return values in IntegerType's name and id methods to more accurately reflect the class's purpose. 'integer' was renamed to 'MultiPrecisionInteger' and 'api' was renamed to 'apz' to avoid ambiguity.

* Update boolean flag in IntegerType configuration

Changed the last configuration flag from true to false to correct the object initialization settings. This adjustment ensures the proper handling of edge cases during multiprecision integer operations.

* Update include guards in multiprecision headers

Renamed include guards to prevent naming collisions and align with the ROUGHPY_GENERICS_INTERNAL naming convention. This change increases consistency and reduces the risk of conflicts in larger projects.

* Implement basic arithmetic operations for IntegerArithmetic.

Introduce unsafe_add_inplace, unsafe_sub_inplace, unsafe_mul_inplace, and a stub for unsafe_div_inplace using GMP. Ensured non-null safety checks and consistent operation behavior.

* Add IntegerComparison and IntegerNumber classes

Introduce IntegerComparison and IntegerNumber classes to handle integer-specific comparison and numeric operations. Updates also include modifications to CMakeLists.txt to include new files in the build process.

* Refactor IntegerType class initialization

This commit introduces explicit constructors for `IntegerArithmetic`, `IntegerComparison`, and `IntegerNumber` within the `IntegerType` class, improving clarity and initialization logic. It also corrects some formatting issues in the related header files.

* Refactor IntegerType parsing and trait retrieval

Enhanced IntegerType parsing by adding a null check and using mpz_set_str for string conversion. Refactored trait retrieval by returning appropriate built-in traits and adding a default unreachable return statement.

* Update vcpkg configuration and dependencies

Updated the vcpkg baseline and refined dependency listings. Also added new dependencies mpfr (v4.2.1) and updated gmp (v6.3.0#1) to ensure compatibility and performance improvements. Mpir is removed because it did not fix the intermittent bug on Windows.

* Add MPFR library support

Introduce a new CMake module to find and configure the MPFR library. Updated main CMakeLists.txt and multiprecision_types to include and link MPFR accordingly.

* Add unit tests for MultiPrecision float type

This commit introduces a new test file, `test_float_type.cpp`, which includes a series of unit tests for the MultiPrecision float type. The tests cover various properties and functionalities, such as identity, reference counting, basic properties, and a range of arithmetic, comparison, and number-like operations.

* Remove unnecessary blank line in test file

This commit removes an extra blank line in the `test_integer_type.cpp` file to improve code readability. No functionality or logic in the code has been impacted by this change.

* Add MPFloatType for multiprecision floating-point support

This commit introduces the MPFloatType class, enabling multiprecision floating-point operations within the generics module. The related header and implementation files were added, and necessary CMakeLists.txt adjustments were made to include the new files. Unit tests for MPFloatType have also been integrated into the test suite.

* Refactor string conversion for mpz_set_str

Changed the conversion of the input string to use a temporary `std::string` object before passing it to `mpz_set_str`. This ensures the function works correctly with different string encodings and formats, improving reliability.

* Refactor precision data type in MPFloatType class

Changed the precision parameter in the `MPFloatType` constructor from `size_t` to `int`. This modification includes an added member variable and ensures that 32 bits of precision is sufficient for the intended calculations.

* Change precision parameter type to int in float_type

Modified the `float_type` method to accept an `int` for precision instead of `size_t`. This change ensures consistency across different parts of the codebase and avoids potential issues with type mismatches.

* Fix rational number parsing with temporary string variable

Previously, passing a string directly to `mpq_set_str` could lead to unexpected behavior. This change introduces a temporary string variable to ensure proper handling and conversion.

* Refactor MPFloatType class to improve functionality

Revised the constructor, member functions, and internal logic of the `MPFloatType` class. Enhanced memory allocation, deallocation, copy/move operations, and parsing methods for better precision handling and error management. Updated return types and added assertions for robustness.

* Update hash calculation in mpz_hash.h

Changed hash initialization to use the mp_size_t of the integer. This ensures a more unique starting hash value and potentially improves collision resistance in hash computations.

* Add cleanup and hash logic for MPFloatType

Implemented proper resource cleanup in the `MPFloatType::destroy_range` and display functions to ensure proper memory management. Added hash calculation logic to generate hashes based on the significand and exponent of the floating-point value. This enhances both functionality and robustness of MPFloatType operations.

* Add FloatArithmetic class for multiprecision float operations

Introduced `FloatArithmetic` class that extends `ArithmeticTrait` and provides inplace arithmetic operations (addition, subtraction, multiplication, division) using MPFR library. This allows for multiprecision floating-point arithmetic within the generics module.

* Add FloatComparison class for multiprecision float operations

Introduced the FloatComparison class inheriting from ComparisonTrait to handle various comparison operations on multiprecision floating-point numbers using MPFR. Implemented methods for equality, less than, less than or equal to, greater than, and greater than or equal to comparisons. This facilitates robust and precise floating-point arithmetic comparisons within the generics module.

* Add new float arithmetic and comparison source files

Included float_arithmetic.cpp, float_arithmetic.h, float_comparison.cpp, and float_comparison.h to the project. This update supports floating-point operations and comparisons, enhancing the multiprecision capabilities of the platform.

* Add FloatNumber class for multiprecision arithmetic.

Introduced FloatNumber class in float_number.h and float_number.cpp to handle multiprecision floating-point operations. Updated CMakeLists.txt to include the new files. This class supports basic arithmetic functions such as sqrt, pow, exp, and log.

* Add float type header and return precision object

Included the necessary header for float type and modified the function to return a new MPFloatType object based on precision input. Changed the parameter type from `size_t` to `int` for consistency.

* Enhance MPFloatType with traits and ensure precision check

Introduce arithmetic, comparison, and number traits to MPFloatType, allowing better trait handling and checks. Add a precision limit check to ensure it does not exceed MPFR_PREC_MAX. Implement name and ID retrieval methods to provide clearer type identification.

* Add unreachable return to handle all cases

Ensure function returns a value by adding RPY_UNREACHABLE_RETURN(false) in the default switch case. This addresses potential undefined behavior and improves code safety.

* Update test expectations for ref_count and Div operation

Adjust test expectations to match the correct reference count and check for the presence of the Division operation. These changes ensure the tests accurately reflect the current functionality and object states.

* Remove conditional block for generics directory

The generics subdirectory is now always included in the build process, regardless of the ROUGHPY_EXPERIMENTAL flag. This change simplifies the CMake configuration by eliminating unnecessary conditional checks.

* Refactor `get_type` function declaration.

Moved the implementation details of the `get_type` function to a separate location. This change enhances the readability and maintainability of the code by separating the function declaration from its implementation.

* Improve number parsing with `std::from_chars` specialization

Refactor number parsing logic to handle floating-point and integer types separately using `std::from_chars`. Added a debug assertion to ensure the entire string is parsed correctly.

* Refactor compiler version macros for clarity

Simplified the version macro logic by introducing a generic RPY_COMPILER_VERSION macro. This change ensures consistency across different compiler detections and improves readability.

* Refactor support for older Clang and macOS compilers

Added conditional inclusion of <sstream> and a workaround for older Clang and AppleClang lacking `std::from_chars` for floating points. Cleaned up white spaces and simplified conditional checks to improve code readability.

* Fix type conversion in legacy compilers.

Updated the handling of string conversion using istringstream to ensure compatibility with older versions of Clang and AppleClang. This addresses parsing issues with floating point values when from_chars is not available.

* Simplify type parsing in builtin_type_methods.h

Removed conditional compilation directives and updated the logic to streamline type parsing for integral, float, and double values. This improves code readability and maintains compatibility with compilers lacking `std::from_chars` support for floating-point values.

* Include <cstdlib> and mark exceptions as unused

Add the <cstdlib> header for proper functionality and mark caught exceptions as unused by using the RPY_UNUSED macro to prevent compiler warnings for unused variables.

* Fix unreachable return warning in comparison trait

Update RPY_UNREACHABLE_RETURN to return false instead of void to eliminate unreachable return warning in the ComparisonTraitImpl class. This ensures compliance with modern compiler standards and improves code robustness.

* Refactor CMakeLists: Consolidate targets into RoughPy_Platform

Simplify the CMake configurations by merging RoughPy_Generics_BuiltinType and RoughPy_Generics_Multiprecision targets into RoughPy_Platform. This change reduces redundancy and centralizes target management, improving maintainability.

* Mark `backup_display` for export

Add the `ROUGHPY_PLATFORM_EXPORT` macro to the `backup_display` function to ensure it is properly exported for external use. This change allows the function to be accessible outside the compilation unit, facilitating integration with other modules or shared libraries.

* Enhance GMP find module with imported target support

Updated the FindGMP.cmake module to use pkg_check_modules with IMPORTED_TARGET, ensuring the creation of the GMP::GMP target when the package is found. This streamlined the handling of GMP library properties and reduced the redundancy in code, making it easier to manage and maintain.
  • Loading branch information
inakleinbottle authored Nov 26, 2024
1 parent 45c9562 commit bf732fa
Show file tree
Hide file tree
Showing 45 changed files with 2,985 additions and 195 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ find_package(OpenCL CONFIG REQUIRED)
find_package(cereal CONFIG REQUIRED)
find_package(PCGRandom REQUIRED)
find_package(GMP REQUIRED)
find_package(MPFR REQUIRED)
find_package(range-v3 CONFIG REQUIRED)

message(STATUS "Target architecture ${RPY_ARCH}")
Expand Down
105 changes: 51 additions & 54 deletions cmake/Modules/FindGMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ include(SelectLibraryConfigurations)
find_package(PkgConfig QUIET)

if (PkgConfig_FOUND)
pkg_check_modules(PC_GMP QUIET gmp)
pkg_check_modules(PC_GMP QUIET gmp IMPORTED_TARGET)
endif ()

if (GMP_PKG_FOUND)
if (PC_GMP_FOUND)
set(GMP_INCLUDE_DIR "${PC_GMP_INCLUDE_DIRS}")
set(GMP_LIBRARY_DIRS "${PC_GMP_LIBRARY_DIRS}")
set(GMP_LIBRARIES "${PC_GMP_LIBRARIES}")
set(GMP_COMPILE_OPTIONS ${PC_GMP_CFLAGS} ${PC_GMP_CFLAGS_OTHER})
set(GMP_LINK_OPTIONS ${PC_GMP_LDFLAGS} ${PC_GMP_LDFLAGS_OTHER})

add_library(GMP::GMP ALIAS PkgConfig::PC_GMP)
else()

set(_gmp_lib_names gmp libgmp gmp-10 libgmp-10 mpir libmpir)
Expand Down Expand Up @@ -52,60 +54,55 @@ else()


select_library_configurations(GMP)

endif ()




find_package_handle_standard_args(GMP
FOUND_VAR GMP_FOUND
REQUIRED_VARS
find_package_handle_standard_args(GMP
FOUND_VAR GMP_FOUND
REQUIRED_VARS
GMP_LIBRARY GMP_INCLUDE_DIR)

mark_as_advanced(
GMP_INCLUDE_DIR
GMP_LIBRARIES
GMP_LIBRARY_DIRS
GMP_COMPILE_OPTIONS
GMP_LINK_OPTIONS
)


if (GMP_FOUND AND NOT TARGET GMP::GMP)
add_library(GMP::GMP UNKNOWN IMPORTED GLOBAL)
set_target_properties(GMP::GMP PROPERTIES
IMPORTED_LOCATION "${GMP_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GMP_INCLUDE_DIR}"
IMPORTED_IMPLIB "${GMP_LIBRARY}"
mark_as_advanced(
GMP_INCLUDE_DIR
GMP_LIBRARIES
GMP_LIBRARY_DIRS
GMP_COMPILE_OPTIONS
GMP_LINK_OPTIONS
)
# if (GMP_COMPILE_OPTIONS)
# set_target_properties(GMP::GMP PROPERTIES
# INTERFACE_COMPILE_OPTIONS "${GMP_COMPILE_OPTIONS}"
# )
# endif()
# if(GMP_LINK_OPTIONS)
# set_target_properties(GMP::GMP PROPERTIES
# INTERFACE_LINK_OPTIONS "${GMP_LINK_OPTIONS}"
# )
# endif()
#
# if (GMP_LIBRARY_RELEASE)
# set_property(TARGET GMP::GMP APPEND PROPERTY
# IMPORTED_CONFIGURATIONS RELEASE
# )
# set_target_properties(GMP::GMP PROPERTIES
# IMPORTED_LOCATION_RELEASE "${GMP_LIBRARY_RELEASE}"
# )
# endif()
# if (GMP_LIBRARY_DEBUG)
# set_property(TARGET GMP::GMP APPEND PROPERTY
# IMPORTED_CONFIGURATIONS DEBUG
# )
# set_target_properties(GMP::GMP PROPERTIES
# IMPORTED_LOCATION_DEBUG "${GMP_LIBRARY_DEBUG}"
# )
# endif()

if (GMP_FOUND AND NOT TARGET GMP::GMP)
add_library(GMP::GMP UNKNOWN IMPORTED GLOBAL)
set_target_properties(GMP::GMP PROPERTIES
IMPORTED_LOCATION "${GMP_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${GMP_INCLUDE_DIR}"
IMPORTED_IMPLIB "${GMP_LIBRARY}"
)
# if (GMP_COMPILE_OPTIONS)
# set_target_properties(GMP::GMP PROPERTIES
# INTERFACE_COMPILE_OPTIONS "${GMP_COMPILE_OPTIONS}"
# )
# endif()
# if(GMP_LINK_OPTIONS)
# set_target_properties(GMP::GMP PROPERTIES
# INTERFACE_LINK_OPTIONS "${GMP_LINK_OPTIONS}"
# )
# endif()
#
# if (GMP_LIBRARY_RELEASE)
# set_property(TARGET GMP::GMP APPEND PROPERTY
# IMPORTED_CONFIGURATIONS RELEASE
# )
# set_target_properties(GMP::GMP PROPERTIES
# IMPORTED_LOCATION_RELEASE "${GMP_LIBRARY_RELEASE}"
# )
# endif()
# if (GMP_LIBRARY_DEBUG)
# set_property(TARGET GMP::GMP APPEND PROPERTY
# IMPORTED_CONFIGURATIONS DEBUG
# )
# set_target_properties(GMP::GMP PROPERTIES
# IMPORTED_LOCATION_DEBUG "${GMP_LIBRARY_DEBUG}"
# )
# endif()


endif()
endif ()

endif()
84 changes: 84 additions & 0 deletions cmake/Modules/FindMPFR.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

if (MPFR_FOUND)
return()
endif ()

include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)

find_package(PkgConfig QUIET)


if (PkgConfig_FOUND)
pkg_check_modules(PC_MPFR QUIET mpfr IMPORTED_TARGET)
endif ()


if (PC_MPFR_FOUND)
set(MPFR_INCLUDE_DIR "${PC_MPFR_INCLUDE_DIRS}")
set(MPFR_LIBRARY_DIRS "${PC_MPFR_LIBRARY_DIRS}")
set(MPFR_LIBRARIES "${PC_MPFR_LIBRARIES}")
set(MPFR_COMPILE_OPTIONS "${PC_MPFR_CFLAGS} ${PC_MPFR_CFLAGS_OTHER}")
set(MPFR_LINK_OPTIONS "${PC_MPFR_LDFLAGS} ${PC_MPFR_LDFLAGS_OTHER}")

add_library(MPFR::MPFR ALIAS PkgConfig::PC_MPFR)
else ()
set(_mpfr_lib_names mpfr libmpfr)

find_library(MPFR_LIBRARY_RELEASE
NAMES ${_mpfr_lib_names}
HINTS "${VCPKG_INSTALLED_DIR}")

set(_use_debug_dir OFF)
if (DEFINED VCPKG_INSTALLED_DIR)
cmake_path(IS_PREFIX VCPKG_INSTALLED_DIR CMAKE_BINARY_DIR OUTPUT_VARIABLE _use_debug_dir)
endif ()

if (WIN32 OR _use_debug_dir)
find_library(MPFR_LIBRARY_DEBUG
NAMES ${_mpfr_lib_names}
HINTS "${VCPKG_INSTALLED_DIR}/debug"
)
else ()
foreach (_name IN ITEMS ${_mpfr_lib_names})
list(APPEND _mpfr_lib_names_debug "${_name}d")
endforeach ()

find_library(MPFR_LIBRARY_DEBUG
NAMES ${_mpfr_lib_names}
HINTS "${VCPKG_INSTALLED_DIR}")
endif ()

set(MPFR_COMPILE_OPTIONS "")
set(MPFR_LINK_OPTIONS "")

find_path(MPFR_INCLUDE_DIR NAMES mpfr.h HINTS "${VCPKG_INSTALLED_DIR}")

select_library_configurations(MPFR)
find_package_handle_standard_args(MPFR
FOUND_VAR MPFR_FOUND
REQUIRED_VARS MPFR_LIBRARY MPFR_INCLUDE_DIR
)
mark_as_advanced(
MPFR_INCLUDE_DIR
MPFR_LIBRARIES
MPFR_LIBRARY_DIRS
MPFR_COMPILE_OPTIONS
MPFR_LINK_OPTIONS
)

if (MPFR_FOUND AND NOT MPFR::MPFR)
add_library(MPFR::MPFR UNKNOWN IMPORTED GLOBAL)
set_target_properties(MPFR::MPFR PROPERTIES
IMPORTED_LOCATION "${MPFR_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MPFR_INCLUDE_DIR}"
IMPORTED_IMPLIB "${MPFR_LIBRARY}"
)

endif()


endif ()



13 changes: 9 additions & 4 deletions core/include/roughpy/core/detail/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@

// Detect Compiler and Version
# if defined(_MSC_VER)
# define RPY_COMPILER_VERSION(major, minor, patch) ((major)*10 + (minor))
# define RPY_COMPILER_MSVC _MSC_VER
# elif defined(__clang__)
# define RPY_COMPILER_CLANG \
(__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
# define RPY_COMPILER_VERSION(major, minor, patch) \
((major)*10000 + (minor)*100 + (patch))
# define RPY_COMPILER_CLANG \
RPY_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__)
# elif defined(__GNUC__) || defined(__GNUG__)
# define RPY_COMPILER_GCC \
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# define RPY_COMPILER_VERSION(major, minor, patch) \
((major)*10000 + (minor)*100 + (patch))
# define RPY_COMPILER_GCC \
RPY_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)
# elif defined(__INTEL_COMPILER)
# define RPY_COMPILER_INTEL __INTEL_COMPILER
# elif defined(__NVCC__)
Expand Down
2 changes: 1 addition & 1 deletion platform/include/roughpy/generics/comparison_trait.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ bool ComparisonTraitImpl<T>::has_comparison(ComparisonType comp) const noexcept
return dtl::has_greater_equal_test_v<T>
|| (dtl::has_greater_test_v<T> && dtl::has_equal_test_v<T>);
}
RPY_UNREACHABLE_RETURN();
RPY_UNREACHABLE_RETURN(false);
}
template <typename T>
bool ComparisonTraitImpl<T>::unsafe_compare_equal(
Expand Down
27 changes: 22 additions & 5 deletions platform/include/roughpy/generics/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ constexpr BasicProperties basic_properties_of() noexcept;


template <typename T>
TypePtr get_type() noexcept
{
static_assert(false, "There is no Type associated with T");
RPY_UNREACHABLE_RETURN(nullptr);
}
TypePtr get_type() noexcept;
//{
// static_assert(false, "There is no Type associated with T");
// RPY_UNREACHABLE_RETURN(nullptr);
//}

/**
* @brief Encapsulates the definition and functionalities related to custom
Expand Down Expand Up @@ -311,6 +311,23 @@ ROUGHPY_PLATFORM_EXPORT
const BuiltinTypes& get_builtin_types() noexcept;


class ROUGHPY_PLATFORM_EXPORT MultiPrecisionTypes
{
MultiPrecisionTypes();
public:

TypePtr integer_type;
TypePtr rational_type;

RPY_NO_DISCARD
TypePtr float_type(int n_precision) const;

RPY_NO_DISCARD
static const MultiPrecisionTypes& get() noexcept;
};



template <typename T>
/**
* @brief Determines the basic properties of a given type.
Expand Down
2 changes: 1 addition & 1 deletion platform/include/roughpy/generics/values.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ class ROUGHPY_PLATFORM_EXPORT Value

namespace dtl {

void backup_display(std::ostream& os);
void ROUGHPY_PLATFORM_EXPORT backup_display(std::ostream& os);

}

Expand Down
3 changes: 0 additions & 3 deletions platform/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

if(ROUGHPY_EXPERIMENTAL)
add_subdirectory(generics)
endif()

add_subdirectory(devices)

if(ROUGHPY_EXPERIMENTAL)
Expand Down
6 changes: 3 additions & 3 deletions platform/src/generics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target_sources(RoughPy_Platform PRIVATE
backup_display.cpp
comparison_trait.cpp
conversion_trait.cpp
multiprecision_types.cpp
number_trait.cpp
type.cpp
type_builtin.cpp
Expand All @@ -27,10 +28,9 @@ target_sources(RoughPy_Platform PRIVATE


add_subdirectory(builtin_types)
add_subdirectory(multiprecision_types)


target_link_libraries(RoughPy_Platform PRIVATE
RoughPy_Generics_BuiltinType
)

if (ROUGHPY_BUILD_TESTS)

Expand Down
15 changes: 1 addition & 14 deletions platform/src/generics/builtin_types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@



add_library(RoughPy_Generics_BuiltinType STATIC
target_sources(RoughPy_Platform PRIVATE
builtin_type.h
builtin_type_ids.h
builtin_type_methods.h
Expand All @@ -18,19 +18,6 @@ add_library(RoughPy_Generics_BuiltinType STATIC
unsigned_int_type.h
)

set_target_properties(RoughPy_Generics_BuiltinType PROPERTIES
POSITION_INDEPENDENT_CODE ON
)

target_include_directories(RoughPy_Generics_BuiltinType PRIVATE
${ROUGHPY_PLATFORM_INCLUDE_DIR}/../
${CMAKE_CURRENT_BINARY_DIR}/../../..
)

target_link_libraries(RoughPy_Generics_BuiltinType PRIVATE
RoughPy::Core
)


if (ROUGHPY_BUILD_TESTS)

Expand Down
Loading

0 comments on commit bf732fa

Please sign in to comment.