@@ -372,7 +372,7 @@ macro(CheckForMetricsLibrary)
372
372
NAMES igdml64
373
373
PATHS ${SEARCH_LIB_PATH} )
374
374
endif ()
375
-
375
+
376
376
if (NOT ML_LIB_PATH )
377
377
message (WARNING
378
378
"Metrics Library for Metrics Discovery API (Metrics Library for MD API) is not found. "
@@ -402,7 +402,7 @@ macro(GetMDHeaders TARGET)
402
402
endif ()
403
403
endmacro ()
404
404
405
- macro (FindGTPinLibrary TARGET )
405
+ macro (FindGTPinLibrary_legacy TARGET )
406
406
if (DEFINED GTPIN_PATH )
407
407
find_library (GTPIN_LIB_PATH
408
408
NAMES gtpin
@@ -432,7 +432,7 @@ macro(FindGTPinLibrary TARGET)
432
432
${GTPIN_LIB_PATH} /GTPIN/libgtpin_core.so
433
433
${GTPIN_LIB_PATH} /GTPIN/libiga_wrapper.so
434
434
${GTPIN_LIB_PATH} /GTPIN/libstdc++.so.6
435
- COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs .py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
435
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs_legacy .py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
436
436
437
437
target_link_libraries (${TARGET}
438
438
"${GTPIN_LIB_PATH} /GTPIN/libgtpin.so" )
@@ -450,7 +450,7 @@ macro(FindGTPinLibrary TARGET)
450
450
${GTPIN_LIB_PATH} /gtpin.dll
451
451
${GTPIN_LIB_PATH} /gtpin_core.dll
452
452
${GTPIN_LIB_PATH} /iga_wrapper.dll
453
- COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs .py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
453
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs_legacy .py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
454
454
455
455
target_link_libraries (${TARGET}
456
456
"${GTPIN_LIB_PATH} /GTPIN/gtpin.lib" )
@@ -462,7 +462,7 @@ macro(FindGTPinLibrary TARGET)
462
462
endif ()
463
463
endmacro ()
464
464
465
- macro (GetGTPinHeaders TARGET )
465
+ macro (GetGTPinHeaders_legacy TARGET )
466
466
if (DEFINED GTPIN_PATH )
467
467
message (STATUS "Graphics Technology Pin (GT Pin) include path: ${GTPIN_PATH} /Include" )
468
468
target_include_directories (${TARGET}
@@ -520,7 +520,7 @@ macro(GetGTPinHeaders TARGET)
520
520
${GTPIN_INC_PATH} /GTPIN/api/igt_core.h
521
521
${GTPIN_INC_PATH} /GTPIN/api/gt_gpu_defs.h
522
522
${GTPIN_INC_PATH} /GTPIN/api/gt_basic_utils.h
523
- COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_headers .py" ${GTPIN_INC_PATH} ${CMAKE_BINARY_DIR} )
523
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_headers_legacy .py" ${GTPIN_INC_PATH} ${CMAKE_BINARY_DIR} )
524
524
525
525
target_include_directories (${TARGET}
526
526
PUBLIC "${GTPIN_INC_PATH} /GTPIN"
@@ -530,6 +530,222 @@ macro(GetGTPinHeaders TARGET)
530
530
endif ()
531
531
endmacro ()
532
532
533
+ macro (GetGTPinLibrary TARGET )
534
+ if (NOT DEFINED GTPIN_PATH )
535
+ set (GTPIN_LIB_PATH "${CMAKE_BINARY_DIR} " )
536
+ RequirePythonInterp ()
537
+ if (UNIX )
538
+ add_custom_target (gtpin_libs ALL
539
+ DEPENDS ${GTPIN_LIB_PATH} /GTPIN/libgcc_s.so.1
540
+ ${GTPIN_LIB_PATH} /GTPIN/libged.so
541
+ ${GTPIN_LIB_PATH} /GTPIN/libgtpin_core.so
542
+ ${GTPIN_LIB_PATH} /GTPIN/libgtpin.so
543
+ ${GTPIN_LIB_PATH} /GTPIN/libiga_wrapper.so )
544
+ add_custom_command (OUTPUT ${GTPIN_LIB_PATH} /GTPIN/libgcc_s.so.1
545
+ ${GTPIN_LIB_PATH} /GTPIN/libged.so
546
+ ${GTPIN_LIB_PATH} /GTPIN/libgtpin_core.so
547
+ ${GTPIN_LIB_PATH} /GTPIN/libgtpin.so
548
+ ${GTPIN_LIB_PATH} /GTPIN/libiga_wrapper.so
549
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs.py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
550
+ target_link_libraries (${TARGET}
551
+ "${GTPIN_LIB_PATH} /GTPIN/libgtpin.so" )
552
+ target_link_libraries (${TARGET}
553
+ "${GTPIN_LIB_PATH} /GTPIN/libged.so" )
554
+ add_dependencies (${TARGET}
555
+ gtpin_libs )
556
+ elseif (WIN32 )
557
+ add_custom_target (gtpin_libs ALL
558
+ DEPENDS ${GTPIN_LIB_PATH} /GTPIN/gtpin.lib
559
+ ${GTPIN_LIB_PATH} /ged.dll
560
+ ${GTPIN_LIB_PATH} /gtpin.dll
561
+ ${GTPIN_LIB_PATH} /gtpin_core.dll
562
+ ${GTPIN_LIB_PATH} /iga_wrapper.dll )
563
+ add_custom_command (OUTPUT ${GTPIN_LIB_PATH} /GTPIN/gtpin.lib
564
+ ${GTPIN_LIB_PATH} /ged.dll
565
+ ${GTPIN_LIB_PATH} /gtpin.dll
566
+ ${GTPIN_LIB_PATH} /gtpin_core.dll
567
+ ${GTPIN_LIB_PATH} /iga_wrapper.dll
568
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_libs.py" ${GTPIN_LIB_PATH} ${CMAKE_BINARY_DIR} )
569
+ target_link_libraries (${TARGET}
570
+ "${GTPIN_LIB_PATH} /GTPIN/gtpin.lib" )
571
+ add_dependencies (${TARGET}
572
+ gtpin_libs )
573
+ else ()
574
+ message (FATAL_ERROR "Graphics Technology Pin (GT Pin) path was not specified. Use -DGTPIN_PATH to set it" )
575
+ endif ()
576
+ endif ()
577
+ endmacro ()
578
+
579
+ macro (FindGTPinLibrary TARGET )
580
+ if (DEFINED GTPIN_PATH )
581
+ find_library (GTPIN_LIB_PATH
582
+ NAMES gtpin
583
+ HINTS "${GTPIN_PATH} /Lib/intel64" )
584
+ find_library (GTPIN_GED_LIB_PATH
585
+ NAMES ged
586
+ HINTS "${GTPIN_PATH} /Lib/intel64" )
587
+ if (GTPIN_LIB_PATH AND GTPIN_GED_LIB_PATH )
588
+ message (STATUS "Graphics Technology Pin (GT Pin) library path: ${GTPIN_LIB_PATH} & ${GTPIN_GED_LIB_PATH} " )
589
+ target_link_libraries (${TARGET}
590
+ ${GTPIN_LIB_PATH} )
591
+ target_link_libraries (${TARGET}
592
+ ${GTPIN_GED_LIB_PATH} )
593
+ else ()
594
+ message (FATAL_ERROR "Graphics Technology Pin (GT Pin) library was not found at ${GTPIN_PATH} /Lib/intel64" )
595
+ endif ()
596
+ else ()
597
+ message (STATUS "Graphics Technology Pin (GT Pin) path was not defined - it will be downloaded automatically on build" )
598
+ GetGTPinLibrary (${TARGET} )
599
+ endif ()
600
+ endmacro ()
601
+
602
+ macro (GetGTPinHeaders TARGET )
603
+ if (NOT DEFINED GTPIN_PATH )
604
+ set (GTPIN_INC_PATH "${CMAKE_BINARY_DIR} " )
605
+ RequirePythonInterp ()
606
+
607
+ add_custom_target (gtpin_headers ALL
608
+ DEPENDS ${GTPIN_INC_PATH} /GTPIN/api/gt_basic_defs.h
609
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_basic_utils.h
610
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_gen_procedure.h
611
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_gpu_defs.h
612
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_hli_function.h
613
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_ins_fields.h
614
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_knob_defs.h
615
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_knob.h
616
+ ${GTPIN_INC_PATH} /GTPIN/api/gtpin_api.h
617
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_profile_array.h
618
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_profile_trace.h
619
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_reg.h
620
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_cfg.h
621
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_core.h
622
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_event.h
623
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_arch.h
624
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_coder.h
625
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_procedure.h
626
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_hli_library.h
627
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_iarg_factory.h
628
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_iarg.h
629
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_ins_factory.h
630
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_ins.h
631
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_kernel.h
632
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_knob_arg.h
633
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_knob_registry.h
634
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_memory_mapper.h
635
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_profile_buffer.h
636
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_reg_allocator.h
637
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_tool.h
638
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_vreg_factory.h
639
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_vreg.h
640
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_api_version.h
641
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_basic_types.h
642
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_enumerations.h
643
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_enum_types.h
644
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged.h
645
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_ins_field.h )
646
+ add_custom_command (OUTPUT ${GTPIN_INC_PATH} /GTPIN/api/gt_basic_defs.h
647
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_basic_utils.h
648
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_gen_procedure.h
649
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_gpu_defs.h
650
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_hli_function.h
651
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_ins_fields.h
652
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_knob_defs.h
653
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_knob.h
654
+ ${GTPIN_INC_PATH} /GTPIN/api/gtpin_api.h
655
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_profile_array.h
656
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_profile_trace.h
657
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_reg.h
658
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_cfg.h
659
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_core.h
660
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_event.h
661
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_arch.h
662
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_coder.h
663
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_gen_procedure.h
664
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_hli_library.h
665
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_iarg_factory.h
666
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_iarg.h
667
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_ins_factory.h
668
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_ins.h
669
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_kernel.h
670
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_knob_arg.h
671
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_knob_registry.h
672
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_memory_mapper.h
673
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_profile_buffer.h
674
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_reg_allocator.h
675
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_tool.h
676
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_vreg_factory.h
677
+ ${GTPIN_INC_PATH} /GTPIN/api/igt_vreg.h
678
+ ${GTPIN_INC_PATH} /GTPIN/api/gt_api_version.h
679
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_basic_types.h
680
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_enumerations.h
681
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_enum_types.h
682
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged.h
683
+ ${GTPIN_INC_PATH} /GTPIN/ged/ged_ins_field.h
684
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_headers.py" ${GTPIN_INC_PATH} ${CMAKE_BINARY_DIR} )
685
+ target_include_directories (${TARGET}
686
+ PUBLIC "${GTPIN_INC_PATH} /GTPIN"
687
+ PUBLIC "${GTPIN_INC_PATH} /GTPIN/api"
688
+ PUBLIC "${GTPIN_INC_PATH} /GTPIN/ged/intel64" )
689
+ add_dependencies (${TARGET}
690
+ gtpin_headers )
691
+ endif ()
692
+ endmacro ()
693
+
694
+ macro (FindGTPinHeaders TARGET )
695
+ if (CMAKE_INCLUDE_PATH )
696
+ set (CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH} )
697
+ endif ()
698
+ if (DEFINED GTPIN_PATH )
699
+ message (STATUS "Graphics Technology Pin (GT Pin) include path: ${GTPIN_PATH} /Include, ${GTPIN_PATH} /Include/api, ${GTPIN_PATH} /Include/ged/intel64" )
700
+ target_include_directories (${TARGET}
701
+ PUBLIC "${GTPIN_PATH} /Include"
702
+ PUBLIC "${GTPIN_PATH} /Include/api"
703
+ PUBLIC "${GTPIN_PATH} /Include/ged/intel64" )
704
+ else ()
705
+ message (STATUS "Graphics Technology Pin (GT Pin) path was not defined - it will be downloaded automatically on build" )
706
+ GetGTPinHeaders (${TARGET} )
707
+ endif ()
708
+ set (CMAKE_REQUIRED_INCLUDES )
709
+ endmacro ()
710
+
711
+ macro (GetGTPinUtil TARGET UTIL )
712
+ if (NOT DEFINED GTPIN_PATH )
713
+ set (GTPIN_UTIL_PATH "${CMAKE_BINARY_DIR} " )
714
+ RequirePythonInterp ()
715
+ add_custom_target (gtpin_${UTIL} ALL
716
+ DEPENDS "${GTPIN_UTIL_PATH} /GTPIN/utils/${UTIL} .h"
717
+ "${GTPIN_UTIL_PATH} /GTPIN/utils/${UTIL} .cpp" )
718
+ add_custom_command (OUTPUT "${GTPIN_UTIL_PATH} /GTPIN/utils/${UTIL} .h"
719
+ "${GTPIN_UTIL_PATH} /GTPIN/utils/${UTIL} .cpp"
720
+ COMMAND "${PYTHON_EXECUTABLE} " "${PTI_CMAKE_MACRO_DIR} /get_gtpin_util.py" ${GTPIN_UTIL_PATH} ${CMAKE_BINARY_DIR} ${UTIL} )
721
+ target_sources (${TARGET} PRIVATE
722
+ "${GTPIN_UTIL_PATH} /Examples/utils/${UTIL} .cpp" )
723
+ target_include_directories (${TARGET}
724
+ PUBLIC "${GTPIN_UTIL_PATH} /GTPIN/utils" )
725
+ add_dependencies (${TARGET}
726
+ gtpin_${UTIL} )
727
+ endif ()
728
+ endmacro ()
729
+
730
+ macro (FindGTPinUtil TARGET UTIL )
731
+ if (DEFINED GTPIN_PATH )
732
+ find_file (GTPIN_${UTIL}_PATH
733
+ NAMES ${UTIL} .cpp
734
+ PATHS "${GTPIN_PATH} /Examples/utils" )
735
+ if (GTPIN_${UTIL}_PATH )
736
+ target_sources (${TARGET} PRIVATE
737
+ ${GTPIN_${UTIL}_PATH} )
738
+ target_include_directories (${TARGET}
739
+ PUBLIC "${GTPIN_PATH} /Examples/utils" )
740
+ else ()
741
+ message (FATAL_ERROR "Graphics Technology Pin (GT Pin) ${UTIL} was not found at ${GTPIN_PATH} /Examples/utils" )
742
+ endif ()
743
+ else ()
744
+ message (STATUS "Graphics Technology Pin (GT Pin) path was not defined - it will be downloaded automatically on build" )
745
+ GetGTPinUtil (${TARGET} ${UTIL} )
746
+ endif ()
747
+ endmacro ()
748
+
533
749
macro (GetLevelZeroHeaders TARGET )
534
750
set (L0_INC_PATH "${CMAKE_BINARY_DIR} " )
535
751
RequirePythonInterp ()
0 commit comments